1
0
mirror of https://github.com/danog/dns.git synced 2024-11-30 04:29:06 +01:00

Add test for PTR lookup by IP

This commit is contained in:
Niklas Keller 2017-02-05 14:58:22 +01:00 committed by Bob Weinand
parent 2b6925f166
commit 5fc1cde2d2

View File

@ -42,6 +42,15 @@ class IntegrationTest extends \PHPUnit_Framework_TestCase {
});
}
public function testPtrLoopup() {
\Amp\run(function () {
$result = (yield \Amp\Dns\query("8.8.4.4", \Amp\Dns\Record::PTR));
list($addr, $type) = $result[0];
$this->assertSame($addr, "google-public-dns-b.google.com");
$this->assertSame($type, \Amp\Dns\Record::PTR);
});
}
public function provideHostnames() {
return [
["google.com"],