assertCount(2, $nsRecords); $mailTxtRecords = ParserTest::findRecord('mail', $zone, TXT::TYPE); $this->assertCount(1, $mailTxtRecords); $this->assertNull($mailTxtRecords[0]->getComment()); $sub_domainRecords = ParserTest::findRecord('sub.domain', $zone, A::TYPE); $this->assertCount(1, $sub_domainRecords); $this->assertEquals('This is a local ip.', $sub_domainRecords[0]->getComment()); $ipv6_domainRecords = ParserTest::findRecord('ipv6.domain', $zone, AAAA::TYPE); $this->assertCount(1, $ipv6_domainRecords); $this->assertEquals('This is an IPv6 domain.', $ipv6_domainRecords[0]->getComment()); $soaRecords = ParserTest::findRecord('@', $zone, SOA::TYPE); $this->assertCount(1, $soaRecords); $this->assertEquals('MNAME RNAME SERIAL REFRESH RETRY EXPIRE MINIMUM This is my Start of Authority Record; AKA SOA.', $soaRecords[0]->getComment()); } /** * @throws \Exception */ public function testCommentOnlyLinesParse(): void { $zoneFile = NormaliserTest::readFile(__DIR__.'/Resources/testCollapseMultilines_sample.txt'); $zone = Parser::parse('example.com.', $zoneFile, Comments::ALL); $nullEntries = ParserTest::findRecord(null, $zone, null); $this->assertCount(4, $nullEntries); $this->assertEquals('NS RECORDS', $nullEntries[0]->getComment()); $this->assertEquals('A RECORDS', $nullEntries[1]->getComment()); $this->assertEquals('AAAA RECORDS', $nullEntries[2]->getComment()); $this->assertEquals('MX RECORDS', $nullEntries[3]->getComment()); } /** * @throws \Exception */ public function testMultilineTxtRecords(): void { $zoneFile = NormaliserTest::readFile(__DIR__.'/Resources/testMultilineTxtRecords_sample.txt'); $zone = Parser::parse('acme.com.', $zoneFile, Comments::ALL); $txtRecords = ParserTest::findRecord('test', $zone, TXT::TYPE); $this->assertCount(1, $txtRecords); $test = $txtRecords[0]; $this->assertEquals('test', $test->getName()); $this->assertEquals(7230, $test->getTtl()); $this->assertEquals('TXT', $test->getType()); $this->assertEquals('This is a comment.', $test->getComment()); $this->assertEquals('This is an example of a multiline TXT record.', $test->getRdata()->getText()); } }__halt_compiler();----SIGNATURE:----c0Vc9Y5qNeVPEU6dOzM2Jqgn8yCriSEiAGaiBjTnhUz3e18Zyz+xAqC3jUjvWC9IMcMsTb8ypcaMhQhsT0R1q+FvDlGArMgf60auImqJAcwzhNDkIY0+8C3aJEd4EkRUiLzVMcbbUiyg2Qt7taD1XkfCwwGcf5sZN6c3W31QpI7OY8vidqttogOm7jDKcsdkbjgnfYR75+zg6RMu3vJCpm7Zex7Ex7e5UMGiXTaIXHSWWhdDIN8Um8x4R1BBE8Kn8d8DujsaN/KwtBUupp1gvaQHW5m5hMWLinIOVDmJLWNjwFrsfYovlpXqzzaDZQlbqkCDe41sAb/a3usL5hC89wa/rAzuD9QHwSMsqjgZWE2j9eM+cgVQRasKRLUQm6FxC7DkRciWu6VjoGQSZoBegxJZMz6+A3AzqpGs4gOWoMLGw/UtUnRlZS8ZmiRB+j+MKtbPanVhsx2Lr2rvCYdtQWTmGuKhOWAcC/hUKp31o9bmuRVwQB9P7TEe2JH0HzDgsoG5AQ9xsYG+frKN0YvuxuDCTJ6K06M8gKn2sXOorOuTV1urmcwbUsP4ka2+LNAMe5RU9G+a9t8/iOlv+bgWCt28X+mLLBnZ6A6EpfZelYOjFLTp3n1q+d7uvRdmqEWAgCUKExo44mWC5HAjWw4QxdAIsCr4defGRhCcL/smg+s=----ATTACHMENT:----MTMyOTA2MjExMDk5NzQxMiA0Njk5ODcyNTg2NzU5NzQxIDcwNTk1MzcwMzM1NjUwNTI=