Skip to content

Commit 26ea9ed

Browse files
committed
MC-19248: Add static test to prevent regressing mage-init directive fixes made in the phtml files
- Fix unit tests;
1 parent 9f66d5b commit 26ea9ed

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

dev/tests/static/testsuite/Magento/Test/Legacy/PhtmlTemplateTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ public function testJsComponentsAreProperlyInitializedInDataMageInitAttribute()
112112
{
113113
$invoker = new \Magento\Framework\App\Utility\AggregateInvoker($this);
114114
$invoker(
115-
/**
116-
* JS components in data-mage-init attributes should be initialized not in php.
117-
* JS components should be initialized in templates for them to be properly statically analyzed for bundling.
118-
*
119-
* @param string $file
120-
*/
115+
/**
116+
* JS components in data-mage-init attributes should be initialized not in php.
117+
* JS components should be initialized in templates for them to be properly statically analyzed for bundling.
118+
*
119+
* @param string $file
120+
*/
121121
function ($file) {
122122
$whiteList = $this->getWhiteList();
123123
if (!in_array($file, $whiteList, true)
@@ -167,12 +167,12 @@ public function testJsComponentsAreProperlyInitializedInXMagentoInitAttribute()
167167
{
168168
$invoker = new \Magento\Framework\App\Utility\AggregateInvoker($this);
169169
$invoker(
170-
/**
171-
* JS components in x-magento-init attributes should be initialized not in php.
172-
* JS components should be initialized in templates for them to be properly statically analyzed for bundling.
173-
*
174-
* @param string $file
175-
*/
170+
/**
171+
* JS components in x-magento-init attributes should be initialized not in php.
172+
* JS components should be initialized in templates for them to be properly statically analyzed for bundling.
173+
*
174+
* @param string $file
175+
*/
176176
function ($file) {
177177
if (strpos($file, '/view/frontend/templates/') !== false
178178
|| strpos($file, '/view/base/templates/') !== false

0 commit comments

Comments
 (0)