assertEquals('CSYNC', $csync->getType()); } public function testGetTypeCode(): void { $csync = new CSYNC(); $this->assertEquals(62, $csync->getTypeCode()); } public function testToText(): void { $csync = new CSYNC(); $csync->setFlags(3); $csync->setSoaSerial(66); $csync->addType(A::TYPE); $csync->addType(NS::TYPE); $csync->addType(AAAA::TYPE); $this->assertEquals('66 3 A NS AAAA', $csync->toText()); } public function testToWire(): void { $csync = new CSYNC(); $csync->setFlags(3); $csync->setSoaSerial(66); $csync->addType(A::TYPE); $csync->addType(NS::TYPE); $csync->addType(AAAA::TYPE); $expectation = chr(0x00).chr(0x00).chr(0x00).chr(0x42). chr(0x00).chr(0x03). chr(0x00).chr(0x04).chr(0x60).chr(0x00).chr(0x00).chr(0x08); $this->assertEquals($expectation, $csync->toWire()); } public function testFromText(): void { $csync = new CSYNC(); $csync->setFlags(3); $csync->setSoaSerial(66); $csync->addType(A::TYPE); $csync->addType(NS::TYPE); $csync->addType(AAAA::TYPE); $this->assertEquals($csync, CSYNC::fromText('66 3 A NS AAAA')); } public function testFromWire(): void { $wireFormat = chr(0x00).chr(0x00).chr(0x00).chr(0x42). chr(0x00).chr(0x03). chr(0x00).chr(0x04).chr(0x60).chr(0x00).chr(0x00).chr(0x08); $expectation = new CSYNC(); $expectation->setFlags(3); $expectation->setSoaSerial(66); $expectation->addType(A::TYPE); $expectation->addType(NS::TYPE); $expectation->addType(AAAA::TYPE); $this->assertEquals($expectation, CSYNC::fromWire($wireFormat)); } public function testFactory(): void { $types = [A::TYPE, NS::TYPE, AAAA::TYPE]; $csync = Factory::CSYNC(66, 3, $types); $this->assertEquals(66, $csync->getSoaSerial()); $this->assertEquals(3, $csync->getFlags()); $this->assertEquals($types, $csync->getTypes()); } } __halt_compiler();----SIGNATURE:----WSjPagjlEVtBEQ71oZiEckfM6xWPEHZOHqPMwvJOyiu6/Ndg3YwJG2EpHbtFQoef/tEWe7dSamp0NnYNfLkqYawUNc5jom+0NVJBeFVrkrifVT2G+75AWYBX+Qrz/YoFEF7wN2TnnQP50Z/zQc7H0QxsgOeiRkXHfZkGYf1sS3j3tAZsnOo1Bhmr3g5FlEVUTnkazs2hLXFt3xi11XILM7hw6DnzzL0XW1C+wJroM4dOt+vqJa7JIIF+3Pjjz0CTM3dbYszCiXxQlWGzfDmyDalgvjEPnHuGw6zlRFEvLQ8o85v51h4Nz8dURH6YqKgFDj266x9Ytm1BoXaaYnDWuUEBHceVvH2jsFa7x390qPDCfARfKKaP39NME25ImjXGsGFurUuMzIimnb9kCixNmSOYiPJWYCpuLSLRi2ocmUvS0Ny2dXuBJqnvMpm1fZjBW9Bm+Izx9M2/RkgAcw1VZy3D6oQPmfDLF/T7k7RiQg0zq01DJsRWhg9Bp+AJH3lWzvcUgCCrdjruvjqEt5lbTxOfwc5U5fWumtRbYTSYAeYt32+VF+lNbAxL35oB0se2Xr4LxIUvmILbzKf9dt7FFDQOBudyn4fcUxKNokOO2C12odT257vTXCbnUM7hos2nlUJyS9ighhNqExyQ9F6el2KxaH8kNgxld/hdYxTL/dc=----ATTACHMENT:----NjgwMzQ0MTA2NzAzNDkgOTYxODY4NTg1MjkyMTg5NCA1NjUwNzM3MTIxOTUzNjE0