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:
parent
2b6925f166
commit
5fc1cde2d2
@ -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"],
|
||||
|
Loading…
Reference in New Issue
Block a user