Skip to content

Commit 845a71f

Browse files
committed
ACP2E-3631: Adobe Commerce 2.4.7-p3 unit tests are failing
1 parent 93a3e28 commit 845a71f

File tree

2 files changed

+47
-42
lines changed
  • app/code/Magento

2 files changed

+47
-42
lines changed

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

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ public static function exemplarXmlDataProvider()
103103
'<integrations/>',
104104
[
105105
[
106-
"Element 'integrations': Missing child element(s). Expected is ( integration ).The xml was: \n" .
107-
"0:<?xml version=\"1.0\"?>\n1:<integrations/>\n2:\n",
106+
"Element 'integrations': Missing child element(s). Expected is ( integration )." .
107+
"The xml was: \n0:<?xml version=\"1.0\"?>\n1:<integrations/>\n2:\n",
108108
false,
109109
],
110110
],
@@ -134,9 +134,9 @@ public static function exemplarXmlDataProvider()
134134
"Element 'endpoint_url': This element is not expected. Expected is ( email ).The xml was: \n" .
135135
"0:<?xml version=\"1.0\"?>\n1:<integrations>\n2: <integration " .
136136
"name=\"TestIntegration1\">\n3: <endpoint_url>http://endpoint.url" .
137-
"</endpoint_url>\n4: <identity_link_url>http://www.example.com/identity" .
138-
"</identity_link_url>\n5: </integration>\n6: " .
139-
"</integrations>\n7:\n",
137+
"</endpoint_url>\n4: <identity_link_url>" .
138+
"http://www.example.com/identity</identity_link_url>\n5: </integration>" .
139+
"\n6: </integrations>\n7:\n",
140140
false,
141141
],
142142
],
@@ -172,9 +172,9 @@ public static function exemplarXmlDataProvider()
172172
</integrations>',
173173
[
174174
[
175-
"Element 'endpoint_url': [facet 'minLength'] The value has a length of '0'; this underruns the " .
176-
"allowed minimum length of '4'.The xml was: \n0:<?xml version=\"1.0\"?>\n1:<integrations>\n" .
177-
"2: <integration name=\"TestIntegration1\">\n3: " .
175+
"Element 'endpoint_url': [facet 'minLength'] The value has a length of '0'; this underruns " .
176+
"the allowed minimum length of '4'.The xml was: \n0:<?xml version=\"1.0\"?>\n1:<integrations>" .
177+
"\n2: <integration name=\"TestIntegration1\">\n3: " .
178178
"<email>test-integration1@magento.com</email>\n4: <endpoint_url/>\n" .
179179
"5: </integration>\n6: </integrations>\n7:\n",
180180
false,
@@ -191,12 +191,13 @@ public static function exemplarXmlDataProvider()
191191
</integrations>',
192192
[
193193
[
194-
"Element 'identity_link_url': [facet 'minLength'] The value has a length of '0'; this underruns " .
195-
"the allowed minimum length of '4'.The xml was: \n0:<?xml version=\"1.0\"?>\n1:<integrations>\n" .
196-
"2: <integration name=\"TestIntegration1\">\n3: " .
197-
"<email>test-integration1@magento.com</email>\n4: <endpoint_url>" .
198-
"http://endpoint.url</endpoint_url>\n5: <identity_link_url/>\n" .
199-
"6: </integration>\n7: </integrations>\n8:\n",
194+
"Element 'identity_link_url': [facet 'minLength'] The value has a length of '0'; this " .
195+
"underruns the allowed minimum length of '4'.The xml was: \n0:<?xml version=\"1.0\"?>\n1:" .
196+
"<integrations>\n2: <integration name=\"TestIntegration1\">" .
197+
"\n3: <email>test-integration1@magento.com</email>" .
198+
"\n4: <endpoint_url>http://endpoint.url</endpoint_url>" .
199+
"\n5: <identity_link_url/>\n6: </integration>" .
200+
"\n7: </integrations>\n8:\n",
200201
false,
201202
],
202203
],
@@ -287,12 +288,13 @@ public static function exemplarXmlDataProvider()
287288
[
288289
[
289290
"Element 'integrations', attribute 'invalid': The attribute 'invalid' is not allowed.The xml " .
290-
"was: \n0:<?xml version=\"1.0\"?>\n1:<integrations invalid=\"invalid\">\n2: " .
291-
"<integration name=\"TestIntegration1\">\n3: <email>" .
292-
"test-integration1@magento.com</email>\n4: <endpoint_url>" .
293-
"http://endpoint.url</endpoint_url>\n5: <identity_link_url>" .
294-
"http://www.example.com/identity</identity_link_url>\n6: </integration>\n" .
295-
"7: </integrations>\n8:\n",
291+
"was: \n0:<?xml version=\"1.0\"?>\n1:<integrations invalid=\"invalid\">" .
292+
"\n2: <integration name=\"TestIntegration1\">" .
293+
"\n3: <email>test-integration1@magento.com</email>" .
294+
"\n4: <endpoint_url>http://endpoint.url</endpoint_url>" .
295+
"\n5: <identity_link_url>http://www.example.com/identity" .
296+
"</identity_link_url>\n6: </integration>" .
297+
"\n7: </integrations>\n8:\n",
296298
false,
297299
],
298300
],
@@ -353,9 +355,9 @@ public static function exemplarXmlDataProvider()
353355
"was: \n0:<?xml version=\"1.0\"?>\n1:<integrations>\n2: <integration " .
354356
"name=\"TestIntegration1\">\n3: <email>test-integration1@magento.com" .
355357
"</email>\n4: <endpoint_url invalid=\"invalid\">http://endpoint.url" .
356-
"</endpoint_url>\n5: <identity_link_url>http://www.example.com/identity" .
357-
"</identity_link_url>\n6: </integration>\n7: " .
358-
"</integrations>\n8:\n",
358+
"</endpoint_url>\n5: <identity_link_url>" .
359+
"http://www.example.com/identity</identity_link_url>\n6: </integration>" .
360+
"\n7: </integrations>\n8:\n",
359361
false,
360362
],
361363
],
@@ -371,12 +373,12 @@ public static function exemplarXmlDataProvider()
371373
[
372374
[
373375
"Element 'identity_link_url', attribute 'invalid': The attribute 'invalid' is not allowed." .
374-
"The xml was: \n0:<?xml version=\"1.0\"?>\n1:<integrations>\n2: <integration" .
375-
" name=\"TestIntegration1\">\n3: <email>test-integration1@magento.com" .
376-
"</email>\n4: <endpoint_url>http://endpoint.url</endpoint_url>\n" .
377-
"5: <identity_link_url invalid=\"invalid\">http://endpoint.url" .
378-
"</identity_link_url>\n6: </integration>\n" .
379-
"7: </integrations>\n8:\n",
376+
"The xml was: \n0:<?xml version=\"1.0\"?>\n1:<integrations>\n2: " .
377+
"<integration name=\"TestIntegration1\">\n3: " .
378+
"<email>test-integration1@magento.com</email>\n4: " .
379+
"<endpoint_url>http://endpoint.url</endpoint_url>\n5: " .
380+
"<identity_link_url invalid=\"invalid\">http://endpoint.url</identity_link_url>" .
381+
"\n6: </integration>\n7: </integrations>\n8:\n",
380382
false,
381383
],
382384
],
@@ -413,7 +415,8 @@ public static function exemplarXmlDataProvider()
413415
</integrations>',
414416
[
415417
[
416-
"/Element \'integration\', attribute \'name\': .*\'\' (is not a valid value|has a length of \'0\').*/",
418+
"/Element \'integration\', attribute \'name\': .*\'\'" .
419+
" (is not a valid value|has a length of \'0\').*/",
417420
true,
418421
],
419422
],

app/code/Magento/Sales/Test/Unit/Model/Order/Pdf/Config/XsdTest.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ public static function schemaByExemplarDataProvider()
119119
'<config><totals><total name="i1"><title>Title</title></total></totals></config>',
120120
[
121121
[
122-
"Element 'total': Missing child element(s). Expected is one of ( source_field, title_source_field," .
123-
" font_size, display_zero, sort_order, model, amount_prefix ).The xml was: \n0:<?xml " .
124-
"version=\"1.0\"?>\n1:<config><totals><total name=\"i1\"><title>Title</title></total></totals>" .
125-
"</config>\n2:\n",
122+
"Element 'total': Missing child element(s). Expected is one of ( source_field, " .
123+
"title_source_field, font_size, display_zero, sort_order, model, amount_prefix ).The xml was: " .
124+
"\n0:<?xml version=\"1.0\"?>\n1:<config><totals><total name=\"i1\"><title>Title</title></total>" .
125+
"</totals></config>\n2:\n",
126126
false,
127127
],
128128
],
@@ -297,8 +297,8 @@ protected static function _getExemplarTestData()
297297
[
298298
"Element 'title_source_field': [facet 'pattern'] The value '' is not accepted by the " .
299299
"pattern '[a-z0-9_]+'.The xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><totals><total " .
300-
"name=\"i1\"><title>Title</title><source_field>foo</source_field><title_source_field/></total>" .
301-
"</totals></config>\n2:\n",
300+
"name=\"i1\"><title>Title</title><source_field>foo</source_field><title_source_field/>" .
301+
"</total></totals></config>\n2:\n",
302302
false,
303303
],
304304
],
@@ -348,7 +348,8 @@ protected static function _getExemplarTestData()
348348
[
349349
"Element 'font_size': 'A' is not a valid value of the atomic type 'xs:positiveInteger'.The " .
350350
"xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><totals><total name=\"i1\"><title>Title" .
351-
"</title><source_field>foo</source_field><font_size>A</font_size></total></totals></config>\n2:\n",
351+
"</title><source_field>foo</source_field><font_size>A</font_size></total></totals></config>" .
352+
"\n2:\n",
352353
false,
353354
]
354355
],
@@ -368,9 +369,10 @@ protected static function _getExemplarTestData()
368369
'<display_zero>A</display_zero></total></totals></config>',
369370
[
370371
[
371-
"Element 'display_zero': 'A' is not a valid value of the atomic type 'xs:boolean'.The xml was: \n" .
372-
"0:<?xml version=\"1.0\"?>\n1:<config><totals><total name=\"i1\"><title>Title</title>" .
373-
"<source_field>foo</source_field><display_zero>A</display_zero></total></totals></config>\n2:\n",
372+
"Element 'display_zero': 'A' is not a valid value of the atomic type 'xs:boolean'." .
373+
"The xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><totals><total name=\"i1\">" .
374+
"<title>Title</title><source_field>foo</source_field><display_zero>A</display_zero>" .
375+
"</total></totals></config>\n2:\n",
374376
false,
375377
],
376378
],
@@ -390,8 +392,8 @@ protected static function _getExemplarTestData()
390392
'<sort_order>A</sort_order></total></totals></config>',
391393
[
392394
[
393-
"Element 'sort_order': 'A' is not a valid value of the atomic type 'xs:nonNegativeInteger'.The " .
394-
"xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><totals><total name=\"i1\"><title>Title" .
395+
"Element 'sort_order': 'A' is not a valid value of the atomic type 'xs:nonNegativeInteger'." .
396+
"The xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><totals><total name=\"i1\"><title>Title" .
395397
"</title><source_field>foo</source_field><sort_order>A</sort_order></total></totals>" .
396398
"</config>\n2:\n",
397399
false,

0 commit comments

Comments
 (0)