From 4cef1d61519f4627f7dac732e882398cb362dbcf Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Sat, 30 Nov 2024 00:41:47 +0100 Subject: [PATCH] Add ds:MgmtData element --- src/XML/ds/MgmtData.php | 26 ++++++++++++++ src/XML/element.registry.php | 2 +- tests/XML/ds/MgmtDataTest.php | 55 +++++++++++++++++++++++++++++ tests/resources/xml/ds_MgmtData.xml | 1 + 4 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 src/XML/ds/MgmtData.php create mode 100644 tests/XML/ds/MgmtDataTest.php create mode 100644 tests/resources/xml/ds_MgmtData.xml diff --git a/src/XML/ds/MgmtData.php b/src/XML/ds/MgmtData.php new file mode 100644 index 00000000..23a1d7de --- /dev/null +++ b/src/XML/ds/MgmtData.php @@ -0,0 +1,26 @@ +setContent($content); + } +} diff --git a/src/XML/element.registry.php b/src/XML/element.registry.php index 9a55180d..441e0cee 100644 --- a/src/XML/element.registry.php +++ b/src/XML/element.registry.php @@ -12,7 +12,7 @@ 'KeyName' => '\SimpleSAML\XMLSecurity\XML\ds\KeyName', 'KeyValue' => '\SimpleSAML\XMLSecurity\XML\ds\KeyValue', 'Manifest' => '\SimpleSAML\XMLSecurity\XML\ds\Manifest', -// 'MgmtData' => '\SimpleSAML\XMLSecurity\XML\ds\MgmtData', + 'MgmtData' => '\SimpleSAML\XMLSecurity\XML\ds\MgmtData', 'Object' => '\SimpleSAML\XMLSecurity\XML\ds\DsObject', // 'PGPData' => '\SimpleSAML\XMLSecurity\XML\ds\PGPData', 'Reference' => '\SimpleSAML\XMLSecurity\XML\ds\Reference', diff --git a/tests/XML/ds/MgmtDataTest.php b/tests/XML/ds/MgmtDataTest.php new file mode 100644 index 00000000..935b87ce --- /dev/null +++ b/tests/XML/ds/MgmtDataTest.php @@ -0,0 +1,55 @@ +assertEquals( + self::$xmlRepresentation->saveXML(self::$xmlRepresentation->documentElement), + strval($mgmtData), + ); + } +} diff --git a/tests/resources/xml/ds_MgmtData.xml b/tests/resources/xml/ds_MgmtData.xml new file mode 100644 index 00000000..a0e1e1d2 --- /dev/null +++ b/tests/resources/xml/ds_MgmtData.xml @@ -0,0 +1 @@ +ManagementData