Skip to content

Commit 153d265

Browse files
author
Evgeniy Kolesov
committed
MAGETWO-55279: XSD for view.xml is too strict
1 parent acf91d3 commit 153d265

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

lib/internal/Magento/Framework/Config/Test/Unit/XsdTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ public function testInvalidXmlFile($xsdFile, $invalidXmlFile, $expectedErrorsQty
3838
*/
3939
public function invalidXmlFileDataProvider()
4040
{
41-
return [['view.xsd', 'view_invalid.xml', 1], ['theme.xsd', 'theme_invalid.xml', 1]];
41+
return [['view.xsd', 'view_invalid.xml', 8], ['theme.xsd', 'theme_invalid.xml', 1]];
4242
}
4343
}

lib/internal/Magento/Framework/Config/Test/Unit/_files/view_invalid.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,21 @@
1010
<var name="var1">Value1</var>
1111
<var name="var1">Value1</var><!-- duplicate var name -->
1212
</vars>
13+
<media>
14+
<images module="Magento_Catalog">
15+
<!-- Valid image type values -->
16+
<image id="test" type="valid"/>
17+
<image id="test" type="valid_image"/>
18+
<image id="test" type="valid_image_type"/>
19+
<!-- Invalid image type values -->
20+
<image id="test" type="_invalid_image_type"/>
21+
<image id="test" type="invalid-image"/>
22+
<image id="test" type="Invalid"/>
23+
<image id="test" type="invalid_"/>
24+
<image id="test" type="invalid__image"/>
25+
<image id="test" type="i"/>
26+
<image id="test" type="?invalid"/>
27+
<image id="test" type="123"/>
28+
</images>
29+
</media>
1330
</view>

0 commit comments

Comments
 (0)