assertEquals('IPSECKEY', $ipseckey->getType()); } public function testGetTypeCode(): void { $ipseckey = new IPSECKEY(); $this->assertEquals(45, $ipseckey->getTypeCode()); } /** * @dataProvider getDataProvider * * @param string $text * @param int $precedence * @param int $gatewayType * @param int $algorithm * @param string|null $gateway * @param string|null $publicKey */ 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 * * @param string $text * @param int $precedence * @param int $gatewayType * @param int $algorithm * @param string|null $gateway * @param string|null $publicKey * * @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; $this->assertEquals($ipseckey, IPSECKEY::fromWire($wireFormat, $offset, $rdLength)); $this->assertEquals(3 + $rdLength, $offset); } /** * @dataProvider getDataProvider * * @param string $text * @param int $precedence * @param int $gatewayType * @param int $algorithm * @param string|null $gateway * @param string|null $publicKey */ public function testFromText( string $text, int $precedence, int $gatewayType, int $algorithm, ?string $gateway, ?string $publicKey, ): void { $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 * * @param string $text * @param int $precedence * @param int $gatewayType * @param int $algorithm * @param string|null $gateway * @param string|null $publicKey */ 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:----M5cqAn3hXd99hVYpYNy1O60T8KOGKUgtWyXKpxQKZRQnXL5tD+I6zVevj0FERWKI8oerRigjGcFxkASgECAU56q+YNi485Vjdj4aaCPy8ll2g1lu+7Q9aropZaXofoloVwWfFjbM/bRjqzTxny9merxzyQ/5frlsyz7bUqWRkoXthxT0VbXGdcxwcBEodayrqpPHjK2LP6B6BlaLXcQAiQJUKfWKMk1LDHcLBp4osQjhJi1VMpFBzDreElHN763bgJK1jFlAoNeLWFGROtxE0rCP9V38gX2wvKw3lNrHdaTeLhWYu5jvKmIcve12v5o/yOYBiEYXw/s+zC//k5IHkpWI3ValZQLp/+gPLgDSMJj6OTPo/qsOqFIPT+Br14FMki08x2YD/+W7jqh6lRw2ucOUx4tH6rlsx5gdKnS2dEdBTj+iFdMuQz9AstpxoFePjrLURKUUnhKdas1Gg73Az/SbWcxU7jbPxqgk00CxWr3/bc8TCq7dETESTDZdOUs6zHXvFDY44la6DYNq1tcudKo0GRr+hrZUecrhAt2Bjw7LW9yyADQ4ZxISnqiJ5jfN4DrKwCuDFmrnHuyLKJcVDyw3PxkwUVxpkUvKcLNfLR7kLNas8VxdW1QLeb+JvHklU3bqlo3/SfVFkpbk6bGCwpxZDNC/UzeVeTg7kcBZgzU=----ATTACHMENT:----NjU2MzM5MTEwMTc0MzkwNCA3MDM4NjE0NDMwODUxOTY4IDIwNTk1Mzg2MjM4MzQ1MjA=