getResourceRecords()[0]; $this->assertEquals('1', $rr->getName()); $this->assertEquals(Classes::INTERNET, $rr->getClass()); $this->assertEquals(PTR::TYPE, $rr->getType()); $this->assertEquals('gw01.core.acme.com.', $rr->getRdata()->getTarget()); } /** * @throws ParseException|\Exception */ public function testParseReverseRecordFile(): void { $file = NormaliserTest::readFile(__DIR__.'/Resources/50.100.200.in-addr.arpa.db'); $zone = Parser::parse('50.100.200.in-addr.arpa.', $file); $parentRecords = ParserTest::findRecord('@', $zone); $_1Records = ParserTest::findRecord('1', $zone); $_50Records = ParserTest::findRecord('50', $zone); $_150Records = ParserTest::findRecord('150', $zone); $_170Records = ParserTest::findRecord('170', $zone); $this->assertCount(11, $zone); $this->assertCount(3, $parentRecords); $this->assertCount(2, $_1Records); $this->assertCount(1, $_50Records); $this->assertCount(1, $_150Records); $_1 = $_1Records[0]; $_50 = $_50Records[0]; $_150 = $_150Records[0]; $_170 = $_170Records[0]; $this->assertEquals('1', $_1->getName()); $this->assertEquals(1080, $_1->getTtl()); $this->assertEquals(Classes::INTERNET, $_1->getClass()); $this->assertEquals(PTR::TYPE, $_1->getType()); $this->assertEquals('gw01.core.acme.com.', $_1->getRdata()->getTarget()); $this->assertEquals('50', $_50->getName()); $this->assertEquals(1080, $_50->getTtl()); $this->assertEquals(Classes::INTERNET, $_50->getClass()); $this->assertEquals(PTR::TYPE, $_50->getType()); $this->assertEquals('mx1.acme.com.', $_50->getRdata()->getTarget()); $this->assertEquals('150', $_150->getName()); $this->assertEquals(200, $_150->getTtl()); $this->assertEquals(Classes::INTERNET, $_150->getClass()); $this->assertEquals(PTR::TYPE, $_150->getType()); $this->assertEquals('smtp.example.com.', $_150->getRdata()->getTarget()); $this->assertEquals('170', $_170->getName()); $this->assertEquals(150, $_170->getTtl()); $this->assertEquals(Classes::INTERNET, $_170->getClass()); $this->assertEquals(PTR::TYPE, $_170->getType()); $this->assertEquals('netscape.com.', $_170->getRdata()->getTarget()); } } __halt_compiler();----SIGNATURE:----KfA7dzK7zWy+Z1EDfc+lL23JFRviCB8lzceMrBDFXvh+dXk0Z1v7sQaCYdn0X8cLxyuA0Esg2B4Q9arKIZ2K4tiwnP1Iwe8BO3UlbxFnYlinYyNDVCqcMmQha4V7/OrrImP2CLexKBUveOWzaY28rKh3eh8IASm5GpxV1FDY3XGHimHL9koupKVnZ43Gen5mQ7bNmz6rgNqmjNC0MSuthjMKU0mNB8Be4VweQvp8GwPcaVIqJjn9aQgyyW2nU6TQKaU8jjbHe9es2G5yomfvedd3p9erbPbEAmCCyRhGkLhyuLyOgJdIKcmvdpuoN9GoXyW/1q7No0oMT5GRdA9gUmizFle2D+fJnTk32VQKsBESCXcCMZXfGo0ymGcM7/mwU84adqmk+tDrphaXOnV4wTZn1U8v6FJ95u3fdNIIE/5ji7DFpzjFLnRFDUAokegQGUMIN9Wnc4jTex516MdSbyudbXwNWcxQJ8DXQpQRIWwxVubWu9RkC3BzoDKiP2LzYCN2aoKGPEtUiweqDCPIhNnaezVR8g49NQWqSXutA1T6UIey6OHwsm9MPaQnDylTOoRyXxJFtwnNm/elzuapr1BaRSpf0fMKbLORvw64AmKUaQiDpn1nmGZHIgSYmLJBDzaERL8xabXp2qR/8bx2tNJXap8dOUoxmTHmDoJLg94=----ATTACHMENT:----Njc4NDYyOTE4NTE2MzIxMSAxOTUwNDg5OTM2ODQxMDggODU1NDU1NjI4NDA0ODk0NQ==