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:----icPA1FSrfJFhsG7Cj6O5O09HjEhO8xjKxE/IBeQyKJWU2fKOcMKXTYgp6vdOZlJNgFQXY0JY8Ye7cGL9eu0oqTz6WMqKquwdUnN/CtpViCAm7vC5QnvHrjuBvW8o/H/R8c32/DgDDbnU9ACk2Yc039udC5AKXeJti64TGcf1uI9P2oqbELqzYCsiicklz1wJnM6SIHc/sxMAGj+v7SAqQ8iQlbpLf4i5SZTsE4IcSRcr4vzcmov6WVtoCtYmLfnbTXaXRBydTJYEMDjhH/mrrHz3IiYzzzeEbvuYi4y9sp1057wlJn6mQJjjuEO1hPchVOwsEpw+gRahvzwGcvVanq3rJPgOGfzQw3GBNnMXK8+VjEd4gp/lrjxT0mipd7zo6zUCeim+2sGbK+t05fn3a2mWjCjvRwduVTEKYeyk4B6a6F8/HOntIox8rahyhJjJ0qnB+UVQMDcKto89u/9LQGjT9X8wNN78hX8/0OjCLNpaI4iJ9QiCJOqBCyXLOeo3mOVdanQqQrQkqnePmKFLtAs7K8QiYijyLRbJWBkXfVmvnbaGSfglsgSQtmcCnU9ZJjUc8ndL1eKGhTPiDRZySrdMRlm3rcrGmfPHlaom6vPmD0Eezc7SraR5mUxfec73kn0eQAXSK+ZmyNUa1sEhhCguOfOaHrkKHdY8aV2XKZU=----ATTACHMENT:----NzY1MDE3NTA3MDE4NDE3NCA4MjU5NTYwNDExMzY5NjkzIDM5ODcwMjIzNzQ1MDE0NTk=