From 1a3fe07d94f04686526aa30c4aa50ce067abc9ef Mon Sep 17 00:00:00 2001 From: Damian Zabawa Date: Thu, 19 May 2016 12:25:00 +0200 Subject: [PATCH] EZP-25759: Expanding converter paragraph>custom>section parsing fixed https://jira.ez.no/browse/EZP-25759 --- lib/FieldType/XmlText/Converter/Expanding.php | 1 + .../expanding/input/012-customTagSection.xml | 11 +++++++++++ .../expanding/output/012-customTagSection.xml | 11 +++++++++++ 3 files changed, 23 insertions(+) create mode 100644 tests/lib/FieldType/Converter/_fixtures/expanding/input/012-customTagSection.xml create mode 100644 tests/lib/FieldType/Converter/_fixtures/expanding/output/012-customTagSection.xml diff --git a/lib/FieldType/XmlText/Converter/Expanding.php b/lib/FieldType/XmlText/Converter/Expanding.php index 61680e79..b38bc055 100644 --- a/lib/FieldType/XmlText/Converter/Expanding.php +++ b/lib/FieldType/XmlText/Converter/Expanding.php @@ -164,6 +164,7 @@ private function containsBlock(DOMElement $paragraph) return ( $xpath->query($containedExpression, $paragraph)->length !== 0 || $xpath->query('custom/paragraph', $paragraph)->length !== 0 + || $xpath->query('custom/section', $paragraph)->length !== 0 ); } diff --git a/tests/lib/FieldType/Converter/_fixtures/expanding/input/012-customTagSection.xml b/tests/lib/FieldType/Converter/_fixtures/expanding/input/012-customTagSection.xml new file mode 100644 index 00000000..190c101d --- /dev/null +++ b/tests/lib/FieldType/Converter/_fixtures/expanding/input/012-customTagSection.xml @@ -0,0 +1,11 @@ + + + +
+
header
+ paragraph +
+
+
diff --git a/tests/lib/FieldType/Converter/_fixtures/expanding/output/012-customTagSection.xml b/tests/lib/FieldType/Converter/_fixtures/expanding/output/012-customTagSection.xml new file mode 100644 index 00000000..f851e03a --- /dev/null +++ b/tests/lib/FieldType/Converter/_fixtures/expanding/output/012-customTagSection.xml @@ -0,0 +1,11 @@ + + + +
+
header
+ paragraph +
+
+