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:----arkMBG4qlLBGyCX/UvEYDxskUpuaguTkrMkzrqK634TYigIXrsk64VPChaQe1c4V6ppAMVM8/x7t0yjLS86yrQh3uXGRV3MZ87c05T7f1QrEDq54LEYttA2PG9ETrFrUScd5THLyi//QDJ0XKQAQMboJ8S4USGPGXIX6cmXRnfNuFV0Cch3h8qgxe6cTn1GOGPZ8PQ98ZyJ1wc8IjNmrb7z+v1VHe+0nricjO/A1EOf/YUmuUJkC6kA0Lt/1jME27Yt1gD/vcix6Hg1PNN37Do53ZL1F3UMxtsV5X8//+jfpSSEd8s9AIpMLxHC/K6kDV/i9G8QPp+eVuY+fqsZYGvHwQJr/N25taUkHde9jB0FiVGlZpvYc02qAX4AznRKaaTjsjvnRFCCgeEEfHqFkdUWKDoNX55sA+H4C2FiJhg2sNf+UN1dEIqocrNA8M3lk9rsw7Vsn60jy3KBAlhiuycEYhWfELnayCxA8xQC9LzPkMCxAjdkDWW8tDjDReW9/nwUiaoOXs2nwLmcfkPzgVdUQi26Q21JvCp/sQ1UNJi5V3+ZD9F1x0GpRN4XOgBgWYLMvD2IN9eQo+pCVDg7GLPLYVPVqOysIKURqliTq1avKMHY+Tt84vLFzarQla6ss3xxPslGDLQAtWU1IEdc0cbIpXjC4XC7faVxrKHIRnBM=----ATTACHMENT:----NjM4MjAwNTMyODkwMzc2NiAzMzI3MTQ3OTk4NDEwNDgyIDU3OTQwNjI1NjcxNzMyMjA=