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:----gMYrLiSU3PrJmOPXy4TTyRMKBGyjBXzfkwavqQSs8oo16fktGiA7RNeDTPOjlJIQMh5+HFCM/4YuzJnxTPVlafLMkVtwvMIwd9hVAtq2nbdMF83+2Gh8O/iB8kiGv9wMOujjER4gh1iRqPcPUvUZtCNPhBlaqev1PkiwlHOr70eI/0f5KIDQBPo+WWzgEZCFeudNzWKDqElYg5q6nnU+jq0nVtcIvp9jFIX+SoQyC1OQ2BvSVFZG/6VOCj7ys0jzoBojQ3snS9z1SVyajv15YwDJzQ7SfljqQEMOwzwAzlpj0IUBAZOFOe1OCPy5ajXUOljo2Se6FgEsWPNpB13XSq4FEMuxJfc1JKQxmK/paQoo/VD+eNqE1Qohxkg5Yng8ma+w+ZWe7OWdVgGK3eJp376y4e1e5/sZBHEwR6rGAVamuociQ3jdNmcG5c1j20QtvqmOYty946NPn+XOIKCqQaG6wMQbkP0WMHTPt9RG3oIfQFhijS7mjSwGxnrjotNO1mHMYoKyeW6BP5GsW3pJHE+ss4mWdqPcGGgN+ngt4tvzBgPZIFPw7Cw675m4//veW3yIUmVd5oKIY+7IECILA9PQSsrrA/5MCHssQ1Vri8/yg1mb1smkZHh7SX9meGayGFdYGhhxB+awsXQHgDesTgP1A7n04RohcUpBpfrpiww=----ATTACHMENT:----MTYwMjA5Mzk0NTI1MDQxNCA2ODg5NzU3ODg0NjcyNTM0IDg5MzgxODk2MzYwMDQ4MzI=