diff --git a/src/XML/xenc/KANonce.php b/src/XML/xenc/KANonce.php new file mode 100644 index 00000000..44e72e2a --- /dev/null +++ b/src/XML/xenc/KANonce.php @@ -0,0 +1,29 @@ +setContent($content); + } +} diff --git a/tests/XML/xenc/KANonceTest.php b/tests/XML/xenc/KANonceTest.php new file mode 100644 index 00000000..fb72c681 --- /dev/null +++ b/tests/XML/xenc/KANonceTest.php @@ -0,0 +1,65 @@ +assertEquals( + XMLDumper::dumpDOMDocumentXMLWithBase64Content(self::$xmlRepresentation), + strval($kaNonce), + ); + } + + + /** + */ + public function testMarshallingNotBase64(): void + { + $this->expectException(AssertionFailedException::class); + new KANonce('/CTj3d1DB5e2t7CTo9BEzCf5S9NRzwnBgZRlm32REI='); + } +} diff --git a/tests/resources/xml/xenc_KA-Nonce.xml b/tests/resources/xml/xenc_KA-Nonce.xml new file mode 100644 index 00000000..28552277 --- /dev/null +++ b/tests/resources/xml/xenc_KA-Nonce.xml @@ -0,0 +1 @@ +/CTj03d1DB5e2t7CTo9BEzCf5S9NRzwnBgZRlm32REI=