Skip to content

Commit 19f7083

Browse files
author
Maksym Aposov
committed
MAGETWO-37581: Update XSD declaration
1 parent 85ad71a commit 19f7083

File tree

1 file changed

+18
-40
lines changed
  • dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Indexer

1 file changed

+18
-40
lines changed

dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Indexer/ConfigTest.php

Lines changed: 18 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function _getKnownInvalidXml()
4949
*/
5050
protected function _getKnownValidPartialXml()
5151
{
52-
return '';
52+
return null;
5353
}
5454

5555
/**
@@ -69,7 +69,7 @@ protected function _getFileXsd()
6969
*/
7070
protected function _getKnownInvalidPartialXml()
7171
{
72-
return '';
72+
return null;
7373
}
7474

7575
/**
@@ -82,46 +82,24 @@ protected function _getXmlName()
8282
return 'indexer.xml';
8383
}
8484

85-
public function testFileSchemaUsingInvalidXml($expectedErrors = null)
86-
{
87-
$this->markTestSkipped('indexer.xml does not have a partial schema');
88-
}
89-
90-
public function testSchemaUsingPartialXml($expectedErrors = null)
91-
{
92-
$this->markTestSkipped('indexer.xml does not have a partial schema');
93-
}
94-
95-
public function testFileSchemaUsingPartialXml()
96-
{
97-
$this->markTestSkipped('indexer.xml does not have a partial schema');
98-
}
99-
10085
public function testSchemaUsingInvalidXml($expectedErrors = null)
10186
{
102-
$expectedErrors = array_filter(
103-
explode(
104-
"\n",
105-
"
106-
Element 'indexer': Duplicate key-sequence ['catalogsearch_fulltext'] in unique identity-constraint 'uniqueViewId'.
107-
Element 'indexer': Duplicate key-sequence ['indexer_0', 'catalogsearch_fulltext'] in unique identity-constraint" .
108-
" 'uniqueIndexertId'.
109-
Element 'fields': Missing child element(s). Expected is ( field ).
110-
Element 'fields', attribute 'handler': [facet 'pattern'] The value 'field_handler' is not accepted" .
111-
" by the pattern '[a-zA-Z\\\\]+'.
112-
Element 'fields', attribute 'handler': 'field_handler' is not a valid value of the atomic type 'classType'.
113-
Element 'field': Duplicate key-sequence ['visibility'] in unique identity-constraint 'uniqueField'.
114-
Element 'field', attribute 'origin': [facet 'pattern'] The value 'table_name_field_name' is not accepted" .
115-
" by the pattern '[a-zA-Z0-9_]+\\.[a-zA-Z0-9_]+'.
116-
Element 'field', attribute 'origin': 'table_name_field_name' is not a valid value of the atomic type 'originType'.
117-
Element 'field': The attribute 'dataType' is required but missing.
118-
Element 'field', attribute '{http://www.w3.org/2001/XMLSchema-instance}type': The QName value 'any'" .
119-
" of the xsi:type attribute does not resolve to a type definition.
120-
Element 'field', attribute 'dataType': [facet 'enumeration'] The value 'string' is not an element" .
121-
" of the set {'int', 'float', 'varchar'}.
122-
Element 'field', attribute 'dataType': 'string' is not a valid value of the atomic type 'dataType'."
123-
)
124-
);
87+
// @codingStandardsIgnoreStart
88+
$expectedErrors = [
89+
"Element 'indexer': Duplicate key-sequence ['catalogsearch_fulltext'] in unique identity-constraint 'uniqueViewId'.",
90+
"Element 'indexer': Duplicate key-sequence ['indexer_0', 'catalogsearch_fulltext'] in unique identity-constraint 'uniqueIndexertId'.",
91+
"Element 'fields': Missing child element(s). Expected is ( field ).",
92+
"Element 'fields', attribute 'handler': [facet 'pattern'] The value 'field_handler' is not accepted by the pattern '[a-zA-Z\\\\]+'.",
93+
"Element 'fields', attribute 'handler': 'field_handler' is not a valid value of the atomic type 'classType'.",
94+
"Element 'field': Duplicate key-sequence ['visibility'] in unique identity-constraint 'uniqueField'.",
95+
"Element 'field', attribute 'origin': [facet 'pattern'] The value 'table_name_field_name' is not accepted by the pattern '[a-zA-Z0-9_]+\\.[a-zA-Z0-9_]+'.",
96+
"Element 'field', attribute 'origin': 'table_name_field_name' is not a valid value of the atomic type 'originType'.",
97+
"Element 'field': The attribute 'dataType' is required but missing.",
98+
"Element 'field', attribute '{http://www.w3.org/2001/XMLSchema-instance}type': The QName value 'any' of the xsi:type attribute does not resolve to a type definition.",
99+
"Element 'field', attribute 'dataType': [facet 'enumeration'] The value 'string' is not an element of the set {'int', 'float', 'varchar'}.",
100+
"Element 'field', attribute 'dataType': 'string' is not a valid value of the atomic type 'dataType'."
101+
];
102+
// @codingStandardsIgnoreEnd
125103
parent::testSchemaUsingInvalidXml($expectedErrors);
126104
}
127105
}

0 commit comments

Comments
 (0)