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:----iVS7Ud1UcJjCvSESEFVg3LJYSQlFEYUWLQSWLfloIf5/qsTyLpi9zqS5E1JlmQeHB9doEhCom2QuCQXuCvAtDBjcNPCTPsrTyJAO3z8dFbUWYPYB5gqrcxh5hg90mtbwQBL079LZLRdcSDCMloVEgX1u9Ma6R9c0sJb36BeQDlZj35xjghR7vqyKJKyYQZip81WE0oi90NeJ56F2ZZf9bdWkQhohjWMxFnqoHorTaBfbn8lo5fYumpjGEmdEdU88JMN8qJwAxy/FwPg3FL84NnFIGBvheQNDQBO2PJ1mmikdyw0MGwISmCNuCPgXQL2T4QGwlxQzjBcnion/htGjj/OGfc78TIya2Ve7ZVyHgZihrYReC0IiuHuR/0h8wxIh83p5Ue0tfXRNTYIjcuLheNkLVn0fRlPqtMZoClx4X11+SaodsQHNav91iNBm5AtgxgYR4qxFiInLphgBF7AA0jN740D8VxLofeCYLUbEH3IlJqM85v2Oh75D0LvYFPMyFnQERSzsdIzKCN2glCBEM2JBE71R4t7XiIQl1OCBGp2Bsf7+mnGIsgRGkHDBWwGks2XJjxrlhlZ3qHp5druv3uy+kSbhnn++y8UfQ6AJSaZDNkYUg/yvitHfWEWvwNcX7MNTdfZBpH55j4RzwCwzWtB16nGhyfqyJ7fSO6AtYF0=----ATTACHMENT:----MTg4OTQwMzQ2NTg3NTc4OCA4MDczNjQ3Mzg4ODg5NDQ0IDc4MTM4MjI0NDkzNjI2OTI=