.../EntityResource/Tour/TourXmlAnonTest.php | 26 ++++++++++++++++ .../EntityResource/Tour/TourXmlBasicAuthTest.php | 36 ++++++++++++++++++++++ .../EntityResource/Tour/TourXmlCookieTest.php | 31 +++++++++++++++++++ .../src/Functional/XmlNormalizationQuirksTrait.php | 13 ++++++-- 4 files changed, 103 insertions(+), 3 deletions(-) diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlAnonTest.php new file mode 100644 index 0000000..4c96e37 --- /dev/null +++ b/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlAnonTest.php @@ -0,0 +1,26 @@ + $child_value) { - $rewritten_value[$child_key] = ['@key' => $child_key ] + $child_value; + if (is_numeric(array_keys(reset($value))[0])) { + $rewritten_value[$child_key] = ['@key' => $child_key ] + $child_value; + } + else { + $rewritten_value[$child_key] = $child_value; + } } $value = $rewritten_value; }