assertEquals('NAPTR', $naptr->getType()); } public function testGetTypeCode(): void { $naptr = new NAPTR(); $this->assertEquals(35, $naptr->getTypeCode()); } /** * @dataProvider getDataProvider * * @param string $text * @param int $order * @param int $preference * @param string $flags * @param string $services * @param string $regexp * @param string $replacement */ public function testToText( string $text, int $order, int $preference, string $flags, string $services, string $regexp, string $replacement, ): void { $naptr = new NAPTR(); $naptr->setOrder($order); $naptr->setPreference($preference); $naptr->setFlags($flags); $naptr->setServices($services); $naptr->setRegexp($regexp); $naptr->setReplacement($replacement); $this->assertEquals($text, $naptr->toText()); } /** * @dataProvider getDataProvider * * @param string $text * @param int $order * @param int $preference * @param string $flags * @param string $services * @param string $regexp * @param string $replacement */ public function testToAndFromWire( string $text, int $order, int $preference, string $flags, string $services, string $regexp, string $replacement, ): void { $naptr = new NAPTR(); $naptr->setOrder($order); $naptr->setPreference($preference); $naptr->setFlags($flags); $naptr->setServices($services); $naptr->setRegexp($regexp); $naptr->setReplacement($replacement); $wireFormat = $naptr->toWire(); $rdLength = strlen($wireFormat); $wireFormat = 'abc'.$wireFormat; $offset = 3; $this->assertEquals($naptr, NAPTR::fromWire($wireFormat, $offset, $rdLength)); $this->assertEquals(3 + $rdLength, $offset); } /** * @dataProvider getDataProvider * * @param string $text * @param int $order * @param int $preference * @param string $flags * @param string $services * @param string $regexp * @param string $replacement */ public function testFromText( string $text, int $order, int $preference, string $flags, string $services, string $regexp, string $replacement, ): void { $naptr = NAPTR::fromText($text); $this->assertEquals($order, $naptr->getOrder()); $this->assertEquals($preference, $naptr->getPreference()); $this->assertEquals($flags, $naptr->getFlags()); $this->assertEquals($services, $naptr->getServices()); $this->assertEquals($regexp, $naptr->getRegexp()); $this->assertEquals($replacement, $naptr->getReplacement()); } /** * @dataProvider getDataProvider * * @param string $text * @param int $order * @param int $preference * @param string $flags * @param string $services * @param string $regexp * @param string $replacement */ public function testFactory( string $text, int $order, int $preference, string $flags, string $services, string $regexp, string $replacement, ): void { $naptr = Factory::NAPTR($order, $preference, $flags, $services, $regexp, $replacement); $this->assertEquals($order, $naptr->getOrder()); $this->assertEquals($preference, $naptr->getPreference()); $this->assertEquals($flags, $naptr->getFlags()); $this->assertEquals($services, $naptr->getServices()); $this->assertEquals($regexp, $naptr->getRegexp()); $this->assertEquals($replacement, $naptr->getReplacement()); } } __halt_compiler();----SIGNATURE:----Sq0tyTOT4R8j2OVEYN0zFMgAJgHnMTJI/ZVHFri5Z/ocuIyVcTIo2bsKI+hOBdZSBsJLh+mtq2WYNzWh1qWh7ZMsG05KIjg62EnLqZ+H4OK1aLP7/raA6x79LYQXFI/jdDZzgK8QSGJymgR6t2taQsA69M2RA42HYps4qPb8CcrwaX18BM16ypbNOAN6K9tLnON8rShTuxB0vrWjzjuLMaGHgP65FlLtNTXpSnk4hIVuz31X/vYYA6aENUoMV82WeKSdvZ0DACUyg93J8q1kfzeKoiIveTJ0wQodJbZl/N0Wy9lhVPYjoajtRr9vCgYVohW5bXl03Sra1F4SL09qZ//O2XrQN83J4xK/Pd7w1GqqgiRRW6u55qKdy5XOD18UZpmvl8573P7I+GXU04/NY9R1/ed9t8NP0dXvyONDw2jrM2Mg3c5/3IUFz9foOvt5xHwKPyDSL7Y3icKWzIvZlXsVFeeoTboWDmetYKpUNpzgsLQmTxRxcnqTWl1H01iseyvf3QbXIrMevKas6FQew0bgTPj7puOhDUAUeGutGd2JvdHXVsi4ewt4r0D0CI18263eygz1pEacduM0cGSJYdp9UThFa1b9ph4/K2qyMzMCSWMQy5fZmxocj134t1pFaqt/ni3rrzcOOt0fSFF2Y8VWYizSHCwQcbgE4dtdPBw=----ATTACHMENT:----MTgyMjg2OTA4MjAyNzk0OSA0MTk2MjIwNDIzNDc2ODIyIDU2ODc0MjQxOTc3MDAzNzQ=