Skip to content

Commit 91a4218

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-56915' into Kanban-2-PR-2.2
2 parents 2ccb82d + 012f5c0 commit 91a4218

File tree

10 files changed

+33
-16
lines changed

10 files changed

+33
-16
lines changed

app/code/Magento/Theme/etc/config.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,10 @@ Disallow: /*SID=
6464
</allowed_resources>
6565
</media_storage_configuration>
6666
</system>
67+
<dev>
68+
<static>
69+
<sign>1</sign>
70+
</static>
71+
</dev>
6772
</default>
6873
</config>

dev/tests/integration/testsuite/Magento/Catalog/Model/Product/ImageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testSaveFilePlaceholder($model)
4646
public function testGetUrlPlaceholder($model)
4747
{
4848
$this->assertStringMatchesFormat(
49-
'http://localhost/pub/static/frontend/%s/Magento_Catalog/images/product/placeholder/image.jpg',
49+
'http://localhost/pub/static/%s/frontend/%s/Magento_Catalog/images/product/placeholder/image.jpg',
5050
$model->getUrl()
5151
);
5252
}

dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function testGetConfig()
4242
public function testGetConfigCssUrls()
4343
{
4444
$config = $this->_model->getConfig();
45-
$publicPathPattern = 'http://localhost/pub/static/adminhtml/Magento/backend/en_US/mage/%s';
45+
$publicPathPattern = 'http://localhost/pub/static/%s/adminhtml/Magento/backend/en_US/mage/%s';
4646
$this->assertStringMatchesFormat($publicPathPattern, $config->getPopupCss());
4747
$this->assertStringMatchesFormat($publicPathPattern, $config->getContentCss());
4848
}

dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testGetFilesCollection()
5858
$this->assertInstanceOf(\Magento\Framework\DataObject::class, $item);
5959
$this->assertStringEndsWith('/1.swf', $item->getUrl());
6060
$this->assertStringMatchesFormat(
61-
'http://%s/static/adminhtml/%s/%s/Magento_Cms/images/placeholder_thumbnail.jpg',
61+
'http://%s/static/%s/adminhtml/%s/%s/Magento_Cms/images/placeholder_thumbnail.jpg',
6262
$item->getThumbUrl()
6363
);
6464
return;

dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ public function cssDirectiveDataProvider()
283283
* @magentoComponentsDir Magento/Email/Model/_files/design
284284
* @magentoAppIsolation enabled
285285
* @magentoDbIsolation enabled
286+
* @magentoConfigFixture default_store dev/static/sign 0
286287
* @dataProvider inlinecssDirectiveDataProvider
287288
*
288289
* @param string $templateText

dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function testGetProcessedTemplate()
122122
->getArea(Area::AREA_FRONTEND)
123123
->load();
124124

125-
$expectedViewUrl = 'static/frontend/Magento/blank/en_US/Magento_Theme/favicon.ico';
125+
$expectedViewUrl = '/frontend/Magento/blank/en_US/Magento_Theme/favicon.ico';
126126
$this->model->setDesignConfig([
127127
'area' => 'frontend',
128128
'store' => $this->objectManager->get(\Magento\Store\Model\StoreManagerInterface::class)
@@ -578,7 +578,6 @@ public function testGetProcessedTemplateSubject()
578578
->getArea(Area::AREA_FRONTEND)
579579
->load();
580580

581-
$expectedViewUrl = 'static/frontend/Magento/blank/en_US/Magento_Theme/favicon.ico';
582581
$this->model->setTemplateSubject('{{view url="Magento_Theme::favicon.ico"}}');
583582
$this->model->setDesignConfig([
584583
'area' => 'frontend',
@@ -588,10 +587,16 @@ public function testGetProcessedTemplateSubject()
588587
]);
589588

590589
$this->setNotDefaultThemeForFixtureStore();
591-
$this->assertStringEndsNotWith($expectedViewUrl, $this->model->getProcessedTemplateSubject([]));
590+
$this->assertStringMatchesFormat(
591+
'%s/frontend/Magento/luma/en_US/Magento_Theme/favicon.ico',
592+
$this->model->getProcessedTemplateSubject([])
593+
);
592594

593595
$this->setDefaultThemeForFixtureStore();
594-
$this->assertStringEndsWith($expectedViewUrl, $this->model->getProcessedTemplateSubject([]));
596+
$this->assertStringMatchesFormat(
597+
'%s/frontend/Magento/blank/en_US/Magento_Theme/favicon.ico',
598+
$this->model->getProcessedTemplateSubject([])
599+
);
595600
}
596601

597602
/**
@@ -605,7 +610,7 @@ public function testGetDefaultEmailLogo()
605610
->load();
606611

607612
$this->assertStringEndsWith(
608-
'static/frontend/Magento/luma/en_US/Magento_Email/logo_email.png',
613+
'/frontend/Magento/luma/en_US/Magento_Email/logo_email.png',
609614
$this->model->getDefaultEmailLogo()
610615
);
611616
}

dev/tests/integration/testsuite/Magento/Framework/View/Element/AbstractBlockTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,10 @@ public function testGetUrl()
477477
public function testGetViewFileUrl()
478478
{
479479
$actualResult = $this->_block->getViewFileUrl('css/styles.css');
480-
$this->assertStringMatchesFormat('http://localhost/pub/static/frontend/%s/en_US/css/styles.css', $actualResult);
480+
$this->assertStringMatchesFormat(
481+
'http://localhost/pub/static/%s/frontend/%s/en_US/css/styles.css',
482+
$actualResult
483+
);
481484
}
482485

483486
public function testGetModuleName()

dev/tests/integration/testsuite/Magento/Review/Controller/ProductTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ public function testListActionDesign()
1818
$this->getRequest()->setParam('id', $product->getId());
1919
$this->dispatch('review/product/listAction');
2020
$result = $this->getResponse()->getBody();
21-
$this->assertContains("static/frontend/Magento/blank/en_US/Magento_Theme/favicon.ico", $result);
21+
$this->assertContains("/frontend/Magento/blank/en_US/Magento_Theme/favicon.ico", $result);
2222
}
2323
}

dev/tests/integration/testsuite/Magento/Variable/Model/Variable/ConfigTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
2020

2121
protected function setUp()
2222
{
23-
$this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
23+
$this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
2424
\Magento\Variable\Model\Variable\Config::class
2525
);
2626
}
2727

2828
public function testGetWysiwygJsPluginSrc()
2929
{
3030
$src = $this->_model->getWysiwygJsPluginSrc();
31-
$this->assertStringStartsWith('http://localhost/pub/static/adminhtml/Magento/backend/en_US/mage/adminhtml/',
32-
$src);
33-
$this->assertStringEndsWith('editor_plugin.js', $src);
31+
$this->assertStringMatchesFormat(
32+
'http://localhost/pub/static/%s/adminhtml/Magento/backend/en_US/mage/adminhtml/%s/editor_plugin.js',
33+
$src
34+
);
3435
}
3536
}

dev/tests/integration/testsuite/Magento/Widget/Model/Widget/ConfigTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ public function testGetPluginSettings()
4343
$this->assertArrayHasKey('widget_window_url', $settings);
4444

4545
$jsFilename = $settings['widget_plugin_src'];
46-
$this->assertStringStartsWith('http://localhost/pub/static/adminhtml/Magento/backend/en_US/', $jsFilename);
47-
$this->assertStringEndsWith('editor_plugin.js', $jsFilename);
46+
$this->assertStringMatchesFormat(
47+
'http://localhost/pub/static/%s/adminhtml/Magento/backend/en_US/%s/editor_plugin.js',
48+
$jsFilename
49+
);
4850

4951
$this->assertInternalType('array', $settings['widget_placeholders']);
5052

0 commit comments

Comments
 (0)