Skip to content

Commit 3d41bae

Browse files
author
Oleksandr Gorkun
committed
MC-33823: Merge CE, EE and B2B changes
1 parent 64247aa commit 3d41bae

File tree

19 files changed

+30
-26
lines changed

19 files changed

+30
-26
lines changed

app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ $numColumns = count($block->getColumns());
116116
'onclick',
117117
/* @noEscape */ $block->getJsObjectName() . '.setPage(\'' .
118118
/* @noEscape */ ($_curPage - 1) . '\');event.preventDefault();',
119-
'. admin__data-grid-pager button.action-previous'
119+
'.admin__data-grid-pager button.action-previous'
120120
) ?>
121121
<?php else: ?>
122122
<button type="button" class="action-previous disabled">

app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ function changeTaxClassId() {
127127
});
128128
";
129129

130-
$tax->setAfterElementHtml(
131-
/* @noEscape */ $this->secureRenderer->renderTag('script', [], $scriptString, false)
132-
);
130+
$tax->setAfterElementHtml($this->secureRenderer->renderTag('script', [], $scriptString, false));
133131
}
134132

135133
$weight = $this->getForm()->getElement('weight');

app/code/Magento/Checkout/Test/Mftf/Section/StorefrontProductInfoMainSection.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontProductInfoMainSection">
12-
<element name="AddToCart" type="button" selector="#product-addtocart-button"/>
13-
<element name="updateCart" type="button" selector="#product-updatecart-button" timeout="30"/>
12+
<element name="AddToCart" type="button" selector="button#product-addtocart-button"/>
13+
<element name="updateCart" type="button" selector="button#product-updatecart-button" timeout="30"/>
1414
</section>
1515
</sections>

app/code/Magento/Config/Test/Unit/Block/System/Config/Form/Field/Select/AllowspecificTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function testGetAfterElementHtml()
9292

9393
$this->assertStringEndsWith('</script>' . $afterHtmlCode, $actual);
9494
$this->assertStringStartsWith('<script >', trim($actual));
95-
$this->assertContains('test_prefix_spec_element_test_suffix', $actual);
95+
$this->assertStringContainsString('test_prefix_spec_element_test_suffix', $actual);
9696
}
9797

9898
/**

app/code/Magento/Csp/Model/BlockCache.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public function load($identifier)
7070
}
7171
} catch (\Throwable $exception) {
7272
//Most likely block HTML was cached without policy data.
73+
$data = null;
7374
}
7475
if ($data) {
7576
foreach ($data['policies'] as $policyData) {

app/code/Magento/Email/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"magento/module-theme": "*",
1515
"magento/module-require-js": "*",
1616
"magento/module-media-storage": "*",
17-
"magento/module-variable": "*"
17+
"magento/module-variable": "*",
18+
"magento/module-ui": "*"
1819
},
1920
"suggest": {
2021
"magento/module-theme": "*"

app/code/Magento/Integration/Test/Unit/Block/Adminhtml/Widget/Grid/Column/Renderer/ButtonTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ protected function setUp(): void
4444
{
4545
$this->escaperMock = $this->createMock(Escaper::class);
4646
$this->escaperMock->expects($this->any())->method('escapeHtml')->willReturnArgument(0);
47+
$this->escaperMock->expects($this->any())->method('escapeHtmlAttr')->willReturnArgument(0);
4748
$this->contextMock = $this->createPartialMock(Context::class, ['getEscaper']);
4849
$this->contextMock->expects($this->any())->method('getEscaper')->willReturn($this->escaperMock);
4950
$randomMock = $this->createMock(Random::class);

app/code/Magento/Integration/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"magento/module-customer": "*",
1313
"magento/module-security": "*",
1414
"magento/module-store": "*",
15-
"magento/module-user": "*"
15+
"magento/module-user": "*",
16+
"magento/module-ui": "*"
1617
},
1718
"type": "magento2-module",
1819
"license": [

app/code/Magento/Newsletter/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"magento/module-email": "*",
1515
"magento/module-require-js": "*",
1616
"magento/module-store": "*",
17-
"magento/module-widget": "*"
17+
"magento/module-widget": "*",
18+
"magento/module-ui": "*"
1819
},
1920
"type": "magento2-module",
2021
"license": [

app/code/Magento/OfflineShipping/Test/Unit/Block/Adminhtml/Form/Field/ImportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function testGetElementHtml()
9191
'<input id="time_condition" type="hidden" name="test_name" value="',
9292
$testString
9393
);
94-
$this->assertStringEndsWith(
94+
$this->assertStringContainsString(
9595
'<input id="test_name_prefixtest_html_idtest_name_suffix" ' .
9696
'name="test_name" data-ui-id="form-element-test_name" value="" type="file"',
9797
$testString

app/code/Magento/Payment/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"magento/module-directory": "*",
1313
"magento/module-quote": "*",
1414
"magento/module-sales": "*",
15-
"magento/module-store": "*"
15+
"magento/module-store": "*",
16+
"magento/module-ui": "*"
1617
},
1718
"type": "magento2-module",
1819
"license": [

app/code/Magento/Paypal/Test/Unit/Block/Adminhtml/System/Config/Field/CountryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function testRender($requestCountry, $requestDefaultCountry, $canUseDefau
130130
}
131131
$this->_jsHelper->expects($this->once())
132132
->method('getScript')
133-
->with(new LogicalAnd($constraints));
133+
->with(self::logicalAnd($constraints));
134134
$this->_url->expects($this->once())
135135
->method('getUrl')
136136
->with(

app/code/Magento/Tax/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"magento/module-reports": "*",
2020
"magento/module-sales": "*",
2121
"magento/module-shipping": "*",
22-
"magento/module-store": "*"
22+
"magento/module-store": "*",
23+
"magento/module-ui": "*"
2324
},
2425
"suggest": {
2526
"magento/module-tax-sample-data": "*"

app/code/Magento/TaxImportExport/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"magento/module-backend": "*",
1111
"magento/module-directory": "*",
1212
"magento/module-store": "*",
13-
"magento/module-tax": "*"
13+
"magento/module-tax": "*",
14+
"magento/module-ui": "*"
1415
},
1516
"type": "magento2-module",
1617
"license": [

app/code/Magento/User/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"magento/module-email": "*",
1313
"magento/module-integration": "*",
1414
"magento/module-security": "*",
15-
"magento/module-store": "*"
15+
"magento/module-store": "*",
16+
"magento/module-ui": "*"
1617
},
1718
"type": "magento2-module",
1819
"license": [

app/code/Magento/Widget/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"magento/module-cms": "*",
1313
"magento/module-store": "*",
1414
"magento/module-theme": "*",
15-
"magento/module-variable": "*"
15+
"magento/module-variable": "*",
16+
"magento/module-ui": "*"
1617
},
1718
"suggest": {
1819
"magento/module-widget-sample-data": "*"

dev/tests/integration/testsuite/Magento/Csp/CspAwareActionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testAwareAction(): void
3434
$header = $this->getResponse()->getHeader('Content-Security-Policy');
3535
$this->assertNotEmpty($header);
3636

37-
$this->assertContains(
37+
$this->assertStringContainsString(
3838
'script-src https://controller.magento.com'
3939
.' \'self\' \'sha256-H4RRnauTM2X2Xg/z9zkno1crqhsaY3uKKu97uwmnXXE=\'',
4040
$header->getFieldValue()

dev/tests/integration/testsuite/Magento/Csp/CspTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ class CspTest extends AbstractController
2323
*/
2424
private function searchInResponse($response, string $search): bool
2525
{
26-
if (mb_stripos(mb_strtolower($response->getBody()), mb_strtolower($search)) !== false) {
27-
return true;
28-
}
29-
3026
foreach ($response->getHeaders() as $header) {
3127
if (mb_stripos(mb_strtolower($header->toString()), mb_strtolower($search)) !== false) {
3228
return true;

dev/tests/integration/testsuite/Magento/Csp/CspUtilTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ public function testPhtmlHelper(): void
2929
$this->dispatch('csputil/csp/helper');
3030
$content = $this->getResponse()->getContent();
3131

32-
$this->assertContains(
32+
$this->assertStringContainsString(
3333
'<script src="http&#x3A;&#x2F;&#x2F;my.magento.com&#x2F;static&#x2F;script.js"/>',
3434
$content
3535
);
36-
$this->assertContains("<script>\n let myVar = 1;\n</script>", $content);
36+
$this->assertStringContainsString("<script>\n let myVar = 1;\n</script>", $content);
3737
$header = $this->getResponse()->getHeader('Content-Security-Policy');
3838
$this->assertNotEmpty($header);
39-
$this->assertContains('http://my.magento.com', $header->getFieldValue());
40-
$this->assertContains('\'sha256-H4RRnauTM2X2Xg/z9zkno1crqhsaY3uKKu97uwmnXXE=\'', $header->getFieldValue());
39+
$this->assertStringContainsString('http://my.magento.com', $header->getFieldValue());
40+
$this->assertStringContainsString('\'sha256-H4RRnauTM2X2Xg/z9zkno1crqhsaY3uKKu97uwmnXXE=\'', $header->getFieldValue());
4141
}
4242
}

0 commit comments

Comments
 (0)