From 7f4947b9b4cfef4f897436c752e4dca5005e812c Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Thu, 5 Dec 2024 19:07:17 +0100 Subject: [PATCH] Add xenc11:MasterKeyName element --- src/XML/xenc11/MasterKeyName.php | 26 ++++++++++ tests/XML/xenc11/MasterKeyNameTest.php | 51 ++++++++++++++++++++ tests/resources/xml/xenc11_MasterKeyName.xml | 1 + 3 files changed, 78 insertions(+) create mode 100644 src/XML/xenc11/MasterKeyName.php create mode 100644 tests/XML/xenc11/MasterKeyNameTest.php create mode 100644 tests/resources/xml/xenc11_MasterKeyName.xml diff --git a/src/XML/xenc11/MasterKeyName.php b/src/XML/xenc11/MasterKeyName.php new file mode 100644 index 00000000..6f079faf --- /dev/null +++ b/src/XML/xenc11/MasterKeyName.php @@ -0,0 +1,26 @@ +setContent($content); + } +} diff --git a/tests/XML/xenc11/MasterKeyNameTest.php b/tests/XML/xenc11/MasterKeyNameTest.php new file mode 100644 index 00000000..c8d87668 --- /dev/null +++ b/tests/XML/xenc11/MasterKeyNameTest.php @@ -0,0 +1,51 @@ +assertEquals( + self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), + strval($masterKeyName), + ); + } +} diff --git a/tests/resources/xml/xenc11_MasterKeyName.xml b/tests/resources/xml/xenc11_MasterKeyName.xml new file mode 100644 index 00000000..84f524e6 --- /dev/null +++ b/tests/resources/xml/xenc11_MasterKeyName.xml @@ -0,0 +1 @@ +phpunit