Skip to content

Commit

Permalink
Add test for PTR lookup by IP
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Feb 5, 2017
1 parent 2b7e3f0 commit 1135e1c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/IntegrationTest.php
Expand Up @@ -42,6 +42,15 @@ public function testResolveWithCustomServer($server) {
});
}

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"],
Expand Down

0 comments on commit 1135e1c

Please sign in to comment.