Skip to content

Commit 7f03de9

Browse files
committed
Fixed static test of Backend, Catalog, Cron, Config,Customer, EAV, Email and Import Export
1 parent e6ac114 commit 7f03de9

File tree

6 files changed

+23
-28
lines changed

6 files changed

+23
-28
lines changed

app/code/Magento/Backend/Test/Unit/Model/Menu/Config/_files/invalidMenuXmlArray.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -661,9 +661,9 @@
661661
'id="Test_Value::some_value"/></menu></config>',
662662
[
663663
"Element 'update', attribute 'parent': [facet 'pattern'] The value 'Test_Value::system_other%settings' " .
664-
"is not accepted by the pattern '[A-Za-z0-9/_:]{3,}'.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n" .
665-
"1:<config><menu><update parent=\"Test_Value::system_other%settings\" id=\"Test_Value::some_value\"/>" .
666-
"</menu></config>\n2:\n"
664+
"is not accepted by the pattern '[A-Za-z0-9/_:]{3,}'.\nLine: 1\nThe xml was: \n" .
665+
"0:<?xml version=\"1.0\"?>\n1:<config><menu><update parent=\"Test_Value::system_other%settings\" " .
666+
"id=\"Test_Value::some_value\"/></menu></config>\n2:\n"
667667
],
668668
],
669669
'update_resource_attribute_notvalid_regexp_value1' => [

app/code/Magento/Catalog/Test/Unit/Model/Attribute/Config/XsdTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22
/**
3-
* Test for validation rules implemented by XSD schema for catalog attributes configuration
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/

app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsMergedXmlArray.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
declare(strict_types=1);
77

88
return [
9-
// 'options_node_is_required' => [
10-
/* '<?xml version="1.0"?><config><inputType name="name_one" label="Label One"/></config>',*/
11-
// [
12-
// "Element 'inputType': This element is not expected. Expected is ( option ).\nLine: 1\nThe xml was: \n" .
13-
/* "0:<?xml version=\"1.0\"?>\n1:<config><inputType name=\"name_one\" label=\"Label One\"/></config>\n2:\n"*/
14-
// ],
15-
// ],
16-
// 'inputType_node_is_required' => [
17-
/* '<?xml version="1.0"?><config><option name="name_one" label="Label One" renderer="one"/></config>',*/
18-
// [
19-
// "Element 'option': Missing child element(s). Expected is ( inputType ).\nLine: 1\nThe xml was: \n" .
20-
/* "0:<?xml version=\"1.0\"?>\n1:<config><option name=\"name_one\" label=\"Label One\" renderer=\"one\"/>" .*/
21-
// "</config>\n2:\n"
22-
// ],
23-
// ],
9+
'options_node_is_required' => [
10+
'<?xml version="1.0"?><config><inputType name="name_one" label="Label One"/></config>',
11+
[
12+
"Element 'inputType': This element is not expected. Expected is ( option ).\nLine: 1\nThe xml was: \n" .
13+
"0:<?xml version=\"1.0\"?>\n1:<config><inputType name=\"name_one\" label=\"Label One\"/></config>\n2:\n"
14+
],
15+
],
16+
'inputType_node_is_required' => [
17+
'<?xml version="1.0"?><config><option name="name_one" label="Label One" renderer="one"/></config>',
18+
[
19+
"Element 'option': Missing child element(s). Expected is ( inputType ).\nLine: 1\nThe xml was: \n" .
20+
"0:<?xml version=\"1.0\"?>\n1:<config><option name=\"name_one\" label=\"Label One\" renderer=\"one\"/>" .
21+
"</config>\n2:\n"
22+
],
23+
],
2424
'options_node_without_required_attributes' => [
2525
'<?xml version="1.0"?><config><option name="name_one" label="label one"><inputType name="name" label="one"/>' .
2626
'</option><option name="name_two" renderer="renderer"><inputType name="name_two" label="one" /></option>' .

app/code/Magento/Catalog/Test/Unit/Model/ProductOptions/Config/_files/invalidProductOptionsXmlArray.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
'<?xml version="1.0"?><config><option name="name_one"><inputType name="name"/>' .
2525
'</option><option name="name_one"><inputType name="name_two"/></option></config>',
2626
[
27-
"Element 'option': Duplicate key-sequence ['name_one'] in unique identity-constraint 'uniqueOptionName'.\n" .
28-
"Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><option name=\"name_one\">" .
29-
"<inputType name=\"name\"/></option><option name=\"name_one\"><inputType name=\"name_two\"/>" .
30-
"</option></config>\n2:\n"
27+
"Element 'option': Duplicate key-sequence ['name_one'] in unique identity-constraint " .
28+
"'uniqueOptionName'.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><option " .
29+
"name=\"name_one\"><inputType name=\"name\"/></option><option name=\"name_one\"><inputType " .
30+
"name=\"name_two\"/></option></config>\n2:\n"
3131
],
3232
],
3333
'inputType_name_must_be_unique' => [

app/code/Magento/Customer/Test/Unit/Model/Address/Config/XsdTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22
/**
3-
* Test for validation rules implemented by XSD schema for customer address format configuration
4-
*
53
* Copyright © Magento, Inc. All rights reserved.
64
* See COPYING.txt for license details.
75
*/

app/code/Magento/Email/Test/Unit/Model/Template/Config/XsdTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ protected function _testXmlAgainstXsd($fixtureXml, $schemaFile, array $expectedE
179179
$actualResult = $dom->validate($schemaFile, $actualErrors);
180180
$this->assertEquals(empty($expectedErrors), $actualResult);
181181
foreach ($expectedErrors as $error) {
182-
// $this->assertContains($error, $actualErrors);
183-
$newErr = $actualErrors;
182+
$this->assertContains($error, $actualErrors);
184183
}
185184
}
186185
}

0 commit comments

Comments
 (0)