Skip to content

Commit a99d718

Browse files
authored
Merge pull request #7958 from magento-l3/PR_27_OCT_2022
[Chaika] BugFix delivery
2 parents 4a1f1b2 + 29c4d00 commit a99d718

File tree

54 files changed

+628
-628
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+628
-628
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ protected function setUp(): void
4242
public function testSchemaCorrectlyIdentifiesInvalidXml($xmlString, $expectedError)
4343
{
4444
$actualError = $this->_xsdValidator->validate($this->_xsdSchema, $xmlString);
45-
$this->assertEquals($expectedError, $actualError);
45+
$this->assertEquals(false, empty($actualError));
46+
foreach ($expectedError as $error) {
47+
$this->assertContains($error, $actualError);
48+
}
4649
}
4750

4851
public function testSchemaCorrectlyIdentifiesValidXml()

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

Lines changed: 65 additions & 181 deletions
Large diffs are not rendered by default.

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontNavigationSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<element name="topCategory" type="button" selector="//a[contains(@class,'level-top')]/span[contains(text(),'{{var1}}')]" parameterized="true"/>
1212
<element name="subCategory" type="button" selector="//ul[contains(@class,'submenu')]//span[contains(text(),'{{var1}}')]" parameterized="true"/>
1313
<element name="breadcrumbs" type="textarea" selector=".items"/>
14+
<element name="breadcrumbsHomeLink" type="button" selector=".home a"/>
1415
<element name="categoryBreadcrumbs" type="textarea" selector=".breadcrumbs li"/>
1516
<element name="categoryBreadcrumbsByNumber" type="textarea" selector=".breadcrumbs li:nth-of-type({{number}})" parameterized="true"/>
1617
</section>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ protected function setUp(): void
4242
protected function _loadDataForTest($schemaName, $xmlString, $expectedError)
4343
{
4444
$actualError = $this->_xsdValidator->validate($this->_xsdSchemaPath . $schemaName, $xmlString);
45-
$this->assertEquals($expectedError, $actualError);
45+
$this->assertEquals(false, empty($actualError));
46+
foreach ($expectedError as $error) {
47+
$this->assertContains($error, $actualError);
48+
}
4649
}
4750

4851
/**

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@
3535
'</option></config>',
3636
[
3737
"Element 'option', attribute 'renderer': [facet 'pattern'] The value '123true' is not accepted by the " .
38-
"pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
39-
"Element 'option', attribute 'renderer': '123true' is not a valid value of the atomic" .
40-
" type 'modelName'.\nLine: 1\n"
38+
"pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n"
4139
],
4240
],
4341
'disabled_attribute_with_invalid_value' => [

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ protected function setUp(): void
4242
public function testSchemaCorrectlyIdentifiesInvalidXml($xmlString, $expectedError)
4343
{
4444
$actualError = $this->_xsdValidator->validate($this->_xsdSchema, $xmlString);
45-
$this->assertEquals($expectedError, $actualError);
45+
$this->assertEquals(false, empty($actualError));
46+
foreach ($expectedError as $error) {
47+
$this->assertContains($error, $actualError);
48+
}
4649
}
4750

4851
public function testSchemaCorrectlyIdentifiesValidXml()

app/code/Magento/Catalog/Test/Unit/Model/ProductTypes/Config/_files/invalidProductTypesXmlArray.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
'<?xml version="1.0"?><config><type name="some_name" modelInstance="123" /></config>',
2626
[
2727
"Element 'type', attribute 'modelInstance': [facet 'pattern'] The value '123' is not accepted by the" .
28-
" pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
29-
"Element 'type', attribute 'modelInstance': '123' is not a valid value of the atomic type" .
30-
" 'modelName'.\nLine: 1\n"
28+
" pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n"
3129
],
3230
],
3331
'type_indexpriority_invalid_value' => [
@@ -59,18 +57,14 @@
5957
'<?xml version="1.0"?><config><type name="some_name"><priceModel instance="123123" /></type></config>',
6058
[
6159
"Element 'priceModel', attribute 'instance': [facet 'pattern'] The value '123123' is not accepted " .
62-
"by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
63-
"Element 'priceModel', attribute 'instance': '123123' is not a valid value of the atomic type" .
64-
" 'modelName'.\nLine: 1\n"
60+
"by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n"
6561
],
6662
],
6763
'type_indexermodel_instance_invalid_value' => [
6864
'<?xml version="1.0"?><config><type name="some_name"><indexerModel instance="123" /></type></config>',
6965
[
7066
"Element 'indexerModel', attribute 'instance': [facet 'pattern'] The value '123' is not accepted by " .
71-
"the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
72-
"Element 'indexerModel', attribute 'instance': '123' is not a valid value of the atomic type" .
73-
" 'modelName'.\nLine: 1\n"
67+
"the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n"
7468
],
7569
],
7670
'type_indexermodel_without_required_instance_attribute' => [
@@ -85,9 +79,7 @@
8579
'<?xml version="1.0"?><config><type name="some_name"><stockIndexerModel instance="1234"/></type></config>',
8680
[
8781
"Element 'stockIndexerModel', attribute 'instance': [facet 'pattern'] The value '1234' is not " .
88-
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n",
89-
"Element 'stockIndexerModel', attribute 'instance': '1234' is not a valid value of the atomic " .
90-
"type 'modelName'.\nLine: 1\n"
82+
"accepted by the pattern '([\\\\]?[a-zA-Z_][a-zA-Z0-9_]*)+'.\nLine: 1\n"
9183
],
9284
],
9385
'allowedselectiontypes_without_required_type_handle' => [

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ protected function setUp(): void
4242
public function testSchemaCorrectlyIdentifiesInvalidXml($xmlString, $expectedError)
4343
{
4444
$actualError = $this->_xsdValidator->validate($this->_xsdSchema, $xmlString);
45-
$this->assertEquals($expectedError, $actualError);
45+
$this->assertEquals(false, empty($actualError));
46+
foreach ($expectedError as $error) {
47+
$this->assertContains($error, $actualError);
48+
}
4649
}
4750

4851
public function testSchemaCorrectlyIdentifiesValidXml()

app/code/Magento/Config/Test/Unit/Model/Config/_files/invalidSystemXmlArray.php

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@
6565
"Element 'config_path': [facet 'minLength'] The value has a length of '2'; this underruns " .
6666
"the allowed minimum length of '5'.\nLine: 1\n",
6767
"Element 'config_path': [facet 'pattern'] The value 'co' is not " .
68-
"accepted by the pattern '[a-zA-Z0-9_\\\\]+/[a-zA-Z0-9_\\\\]+/[a-zA-Z0-9_\\\\]+'.\nLine: 1\n",
69-
"Element 'config_path': 'co' is " . "not a valid value of the atomic type 'typeConfigPath'.\nLine: 1\n"
68+
"accepted by the pattern '[a-zA-Z0-9_\\\\]+/[a-zA-Z0-9_\\\\]+/[a-zA-Z0-9_\\\\]+'.\nLine: 1\n"
7069
],
7170
],
7271
'if_module_enabled_with_invalid_type' => [
@@ -78,8 +77,7 @@
7877
"Element 'if_module_enabled': [facet 'minLength'] The value has a length of '3'; this underruns the " .
7978
"allowed minimum length of '5'.\nLine: 1\n",
8079
"Element 'if_module_enabled': [facet 'pattern'] The value 'Som' is not " .
81-
"accepted by the pattern '[A-Z]+[a-zA-Z0-9]{1,}[_\\\\][A-Z]+[A-Z0-9a-z]{1,}'.\nLine: 1\n",
82-
"Element 'if_module_enabled': 'Som' " . "is not a valid value of the atomic type 'typeModule'.\nLine: 1\n"
80+
"accepted by the pattern '[A-Z]+[a-zA-Z0-9]{1,}[_\\\\][A-Z]+[A-Z0-9a-z]{1,}'.\nLine: 1\n"
8381
],
8482
],
8583
'id_minimum length' => [
@@ -89,22 +87,11 @@
8987
[
9088
"Element 'section', attribute 'id': [facet 'minLength'] The value 's' has a length of '1'; this " .
9189
"underruns the allowed minimum length of '2'.\nLine: 1\n",
92-
"Element 'section', attribute 'id': 's' is not a valid value " . "of the atomic type 'typeId'.\nLine: 1\n",
93-
"Element 'section', attribute 'id': Warning: No precomputed " .
94-
"value available, the value was either invalid or something strange happend.\nLine: 1\n",
9590
"Element 'field', attribute " .
9691
"'id': [facet 'minLength'] The value 'f' has a length of '1'; this underruns the allowed minimum length " .
9792
"of '2'.\nLine: 1\n",
98-
"Element 'field', attribute 'id': 'f' is not a valid value of the atomic type 'typeId'.\nLine: 1\n",
99-
"Element" .
100-
" 'field', attribute 'id': " .
101-
"Warning: No precomputed value available, the value was either invalid or something" .
102-
" strange happend.\nLine: 1\n",
10393
"Element 'tab', attribute 'id': [facet 'minLength'] The value 'h' has a length of '1'; " .
104-
"this underruns the allowed minimum length of '2'.\nLine: 1\n",
105-
"Element 'tab', attribute 'id': 'h' is not a valid value" . " of the atomic type 'typeId'.\nLine: 1\n",
106-
"Element 'tab', attribute 'id': Warning: No precomputed value available, " .
107-
"the value was either invalid or something strange happend.\nLine: 1\n"
94+
"this underruns the allowed minimum length of '2'.\nLine: 1\n"
10895
],
10996
],
11097
'source_model_with_invalid_type' => [
@@ -114,8 +101,7 @@
114101
'<group id="group2"><label>Label_One</label></group></section></system></config>',
115102
[
116103
"Element 'source_model': [facet 'minLength'] The value has a length of '4'; this underruns the allowed " .
117-
"minimum length of '5'.\nLine: 1\n",
118-
"Element 'source_model': 'Sour' is not a valid value of the atomic" . " type 'typeModel'.\nLine: 1\n"
104+
"minimum length of '5'.\nLine: 1\n"
119105
],
120106
],
121107
'base_url_with_invalid_type' => [
@@ -126,8 +112,7 @@
126112
"Element 'resource': [facet 'minLength'] The value has a length of '4'; this underruns the allowed " .
127113
"minimum length of '8'.\nLine: 1\n",
128114
"Element 'resource': [facet 'pattern'] The value 'One:' is not accepted by the " .
129-
"pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\nLine: 1\n",
130-
"Element 'resource': 'One:' is not " . "a valid value of the atomic type 'typeAclResourceId'.\nLine: 1\n"
115+
"pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\nLine: 1\n"
131116
],
132117
],
133118
'advanced_with_invalid_type' => [

app/code/Magento/Customer/etc/di.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,4 +570,19 @@
570570
<type name="Magento\Customer\Model\EmailNotificationInterface">
571571
<plugin name="saveWishlistDataAndAddReferenceKeyToBackUrl" type="Magento\Wishlist\Plugin\SaveWishlistDataAndAddReferenceKeyToBackUrl"/>
572572
</type>
573+
<type name="Magento\Eav\Model\Validator\Attribute\Data">
574+
<arguments>
575+
<argument name="ignoredAttributesByTypesList" xsi:type="array">
576+
<item name="customer" xsi:type="array">
577+
<item name="website_id" xsi:type="string">website_id</item>
578+
<item name="store_id" xsi:type="string">store_id</item>
579+
<item name="group_id" xsi:type="string">group_id</item>
580+
<item name="dob" xsi:type="string">dob</item>
581+
</item>
582+
<item name="customer_address" xsi:type="array">
583+
<item name="country_id" xsi:type="string">country_id</item>
584+
</item>
585+
</argument>
586+
</arguments>
587+
</type>
573588
</config>

0 commit comments

Comments
 (0)