From 5fc1cde2d29e94d731ab96d5ef5f9f20958315cc Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Sun, 5 Feb 2017 14:58:22 +0100 Subject: [PATCH] Add test for PTR lookup by IP --- test/IntegrationTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/IntegrationTest.php b/test/IntegrationTest.php index ceec2c4..410e9cf 100644 --- a/test/IntegrationTest.php +++ b/test/IntegrationTest.php @@ -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"],