aRdata = new A(); } public function testGetType(): void { $this->assertEquals('A', $this->aRdata->getType()); } public function testSetAddress(): void { $address = '192.168.1.1'; $this->aRdata->setAddress($address); $this->assertEquals($address, $this->aRdata->getAddress()); } public function testOutput(): void { $address = '192.168.1.1'; $this->aRdata->setAddress($address); $this->assertEquals($address, $this->aRdata->toText()); $this->assertEquals($address, $this->aRdata->toText()); } public function testFromText(): void { $text = '200.100.50.1'; /** @var A $a */ $a = A::fromText($text); $this->assertEquals($text, $a->getAddress()); } /** * @throws DecodeException */ public function testWire(): void { $address = '200.100.50.1'; $expectation = inet_pton($address); /** @var A $a */ $a = A::fromWire($expectation); $this->assertEquals($expectation, $a->toWire()); $this->assertEquals($address, $a->getAddress()); } /** * @throws DecodeException */ public function testFromWire(): void { $wire = pack('C6', 0x07, 0xC0, 0xff, 0x01, 0x01, 0x07); //⍾192.255.1.1⍾ $offset = 1; /** @var A $a */ $a = A::fromWire($wire, $offset); $this->assertEquals('192.255.1.1', $a->getAddress()); $this->assertEquals(chr(0x07), $wire[$offset]); } } __halt_compiler();----SIGNATURE:----2VGHAQnNsn1N7wEJI4N82MhRUhnshfWnLfdgVAl5tiaCgZnm/WkN02Ez//Yz0qbyoAeJCKQzUmML8qjmtDme9hA49jVfs4soO2DUWbGhVHbC4B0nwX4KwnUiVtN9IlPa/DnLjmNWLRFuw4okt+UY+a+Mo+Kwo/LABlmzg5LWjLDF0Iz7/Td8bX8tluT2Jqy3PfVPhFjzUBwamq/p1JRbwawBUMOmFNAxzHfBHhdgTj9BjDZsD4FihpCF4ER9C2jW7Que/iVGTf04X2znI+Zaq2RAzT86GIJTD6ioANh0sssXtBvbOOFLGF6tjFrjVZVSkGIHMarUZFKpmAbe+Zid2y2d34ALJ/dAyUWV3SxqBtyAe9jOFZwcehDKHN1EB8R1WwHZD2tQ26/3hhA+vhEOpWGa2niHIEPdMWDVN1uAM3i2DSy4N9YKcr44I3PDSl5ChbF7+V2aDFdVaQZAELVRDyBxVUtavcU1oBSReaa2yzI5ohYWFzCIR50Fw49CH5rz8g4WDrfsTT8G5YJSEv7Uwnc/PMkSjD+juqTwAlI8uYYYoUDByAVjhoIemgP6NZXz4Ua/+XRM+8s5k6v4PzhF6o+2DobETWp0IoRcV6+rhhSdknlWDOWGU0+M8qwxrRzVssIucO1todlzlj8QZjMdjSZLERSWpG1yslQZL/wExKk=----ATTACHMENT:----MTE1NDU1NzMyMDQ4NzEyIDI3ODY2NDQ2NTkzOTc0NjggNDg2MTkxNTM1NDI4MDMzNw==