setAddress($address); $this->assertEquals($address, $aaaa->toText()); } public function testFromText(): void { $text = '2003:dead:beef:4dad:23:46:bb:101'; /** @var AAAA $aaaa */ $aaaa = AAAA::fromText($text); $this->assertEquals($text, $aaaa->getAddress()); } public function testToWire(): void { $address = '2003:dead:beef:4dad:23:46:bb:101'; $expectation = inet_pton($address); /** @var AAAA $aaaa */ $aaaa = AAAA::fromWire($expectation); $this->assertEquals($expectation, $aaaa->toWire()); $this->assertEquals($address, $aaaa->getAddress()); } public function testGetType(): void { $aaaa = new AAAA(); $this->assertEquals('AAAA', $aaaa->getType()); } public function testGetTypeCode(): void { $aaaa = new AAAA(); $this->assertEquals(28, $aaaa->getTypeCode()); } /** * @throws DecodeException */ public function testFromWire(): void { $wire = chr(0x07).inet_pton('beef::1').chr(0x07); $offset = 1; $aaaa = AAAA::fromWire($wire, $offset); $this->assertEquals('beef::1', $aaaa->getAddress()); $this->assertEquals(17, $offset); } public function testFactory(): void { $aaaa = new AAAA(); $aaaa->setAddress('2001:acad:1::'); $this->assertEquals(Factory::AAAA('2001:acad:1::'), $aaaa); } } __halt_compiler();----SIGNATURE:----ExifR7ykcxP257v7ea4tvcE989C07hURjxQYrb8lknu2H84tr9vSwaf7eEsDPxD17EtzRbQ90QYQgnjsh50JQTCzdsLigQGzhXx+B9TaBFMun8ndZ9TIlKgY2NR3UR9AcCj48mciY7HaeHkV7VNYVWT/U3+8eVOMTPvhMHcghxh+rshYgQWtDAQ+K/miw7ypzw7pRljY9AJkFKsxTyx5mfLAPxJVK+gcplaqtT0Rv5kRTvwHlwynmIg56fFYvyzDfSPX5HxsXywAmCSXIu5maZVFjJWwK0zigqfoTLqDje8oAD+g99eNwTtd42FBUNjxFshWv1opFIjtf2nmSsc9Wu5hIn0mkbcU7kOv6Eg3K4c94v7p/ssGSrbwMQ7f3HjOjyW121wpONPUUvqN3A6BHhl7PZzdxLQBVH+GKNFzEQkrj7Qg8BFx/xX16pMTBriYfPfcyK1uxrsJqzOALjrYDCnFBiDRJEzcF1J5Lpl5VUuQS5JvOsIaGxL7y+LldOOu2S8/RuxMxlAUcefpJezwygojrp10kuP4RnQd1gNEdbrhnYDSr/8GBMETPsAT16HXnJXWY77eNrmOndcbCGMyxFsYKJkRgZ0Vk8yhIwvgFVN2KtmwdiCUWgtrbrMAVVp5WDOig4Wc6DUuNoAgAnU2nuxtxqRxTzwOFTGu+WWT/ac=----ATTACHMENT:----OTk2NTAxODgxMDIwMjg3NCA5NDQ4NTA0MTk3MTMxNzc0IDc4MDk3Nzc4MzUyNDQz