assertEquals('IPSECKEY', $ipseckey->getType()); } public function testGetTypeCode(): void { $ipseckey = new IPSECKEY(); $this->assertEquals(45, $ipseckey->getTypeCode()); } /** * @dataProvider getDataProvider */ public function testToText( string $text, int $precedence, int $gatewayType, int $algorithm, ?string $gateway, ?string $publicKey, ): void { $ipseckey = new IPSECKEY(); $ipseckey->setPrecedence($precedence); $ipseckey->setGateway($gateway); $ipseckey->setPublicKey($algorithm, $publicKey); $this->assertEquals($text, $ipseckey->toText()); } /** * @dataProvider getDataProvider * * @throws DecodeException */ public function testToFromWire( string $text, int $precedence, int $gatewayType, int $algorithm, ?string $gateway, ?string $publicKey, ): void { $ipseckey = new IPSECKEY(); $ipseckey->setPrecedence($precedence); $ipseckey->setGateway($gateway); $ipseckey->setPublicKey($algorithm, $publicKey); $wireFormat = $ipseckey->toWire(); $rdLength = strlen($wireFormat); $wireFormat = 'abc'.$wireFormat; $offset = 3; $fromWire = new IPSECKEY(); $fromWire->fromWire($wireFormat, $offset, $rdLength); $this->assertEquals($ipseckey, $fromWire); $this->assertEquals(3 + $rdLength, $offset); } /** * @dataProvider getDataProvider */ public function testFromText( string $text, int $precedence, int $gatewayType, int $algorithm, ?string $gateway, ?string $publicKey, ): void { $ipseckey = new IPSECKEY(); $ipseckey->fromText($text); $this->assertEquals($precedence, $ipseckey->getPrecedence()); $this->assertEquals($gatewayType, $ipseckey->getGatewayType()); $this->assertEquals($algorithm, $ipseckey->getAlgorithm()); $this->assertEquals($gateway, $ipseckey->getGateway()); $this->assertEquals($publicKey, $ipseckey->getPublicKey()); } /** * @dataProvider getDataProvider */ public function testFactory( string $text, int $precedence, int $gatewayType, int $algorithm, ?string $gateway, ?string $publicKey, ): void { $ipseckey = Factory::IPSECKEY($precedence, $gateway, $algorithm, $publicKey); $this->assertEquals($text, $ipseckey->toText()); $this->assertEquals($precedence, $ipseckey->getPrecedence()); $this->assertEquals($gatewayType, $ipseckey->getGatewayType()); $this->assertEquals($algorithm, $ipseckey->getAlgorithm()); $this->assertEquals($gateway, $ipseckey->getGateway()); $this->assertEquals($publicKey, $ipseckey->getPublicKey()); } }__halt_compiler();----SIGNATURE:----q00Q0rcV6+CqL4jdAcftnM1qz6OncvoCVNkNkpS0cTRiZSpKj3hmhbAecDV4WLHnok83q3eRmEAp4OuZCoMJ9fprMj6A07g/xGjMT8oeGGReLT2u0hn+g4tiR/HOe2LTbEnFdr5yLsmHCxko3RUvGKHyaqyL1CmdN3rsdFDwBSQTee36vs2K736Jj9DUAOfVOGpf1t0PmXRhed7oWS44a0ZbaUkRZ36QP5hxM7b2reASdguOskUD1Q4+F7AWayHsH7gp4/M3ZJu98t2tCV7tpbrRHc9lPzZND5bvQcrifpcFxaUIl+sRvlKCgLHVxBuMCiJcroRnDe1/twsz9PpKxgtsDH8QBbooLsk5+vM9kuo11Hd+M24n0ZgD3cw/FY9u08Rr38clTfo6FJJdObsAdZZbaYGSEn1PRddEfrCstbDCAbk+CAoGtkbAN3y05N26dA6Subl4e8jVjOi54rq6SfNMZkq0YNQVTeCdEqDBqCwhrPeswyVFz59aYGWZKPIbEdSmt5gsYvu1NxOVEVj/oWWTOVPJpB6HDlf4tZ6GYwZ1v9C5QMughwQGmmxMW0kI9dLh3cnQHyvXRLhTcWa/3G6UR5qndVW13CbfPBlZGre3myGDFH5i6kRvkDC6DPOY8VLia1TB1lJL7FAlMXPpVQbeQBJJjmubqxlmbtWOa3o=----ATTACHMENT:----NzY4MzU3MDU5MjMxNTM3NyAyMTMwNjM5NjQwNTcwNTU4IDIwODk0MTI2NzEzODY3MTM=