File tree Expand file tree Collapse file tree 8 files changed +25
-13
lines changed
dev/tests/integration/testsuite/Magento Expand file tree Collapse file tree 8 files changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public function testSaveFilePlaceholder($model)
46
46
public function testGetUrlPlaceholder ($ model )
47
47
{
48
48
$ 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 ' ,
50
50
$ model ->getUrl ()
51
51
);
52
52
}
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public function testGetConfig()
42
42
public function testGetConfigCssUrls ()
43
43
{
44
44
$ 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 ' ;
46
46
$ this ->assertStringMatchesFormat ($ publicPathPattern , $ config ->getPopupCss ());
47
47
$ this ->assertStringMatchesFormat ($ publicPathPattern , $ config ->getContentCss ());
48
48
}
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public function testGetFilesCollection()
58
58
$ this ->assertInstanceOf (\Magento \Framework \DataObject::class, $ item );
59
59
$ this ->assertStringEndsWith ('/1.swf ' , $ item ->getUrl ());
60
60
$ 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 ' ,
62
62
$ item ->getThumbUrl ()
63
63
);
64
64
return ;
Original file line number Diff line number Diff line change @@ -283,6 +283,7 @@ public function cssDirectiveDataProvider()
283
283
* @magentoComponentsDir Magento/Email/Model/_files/design
284
284
* @magentoAppIsolation enabled
285
285
* @magentoDbIsolation enabled
286
+ * @magentoConfigFixture default_store dev/static/sign 0
286
287
* @dataProvider inlinecssDirectiveDataProvider
287
288
*
288
289
* @param string $templateText
Original file line number Diff line number Diff line change @@ -578,7 +578,6 @@ public function testGetProcessedTemplateSubject()
578
578
->getArea (Area::AREA_FRONTEND )
579
579
->load ();
580
580
581
- $ expectedViewUrl = 'static/frontend/Magento/blank/en_US/Magento_Theme/favicon.ico ' ;
582
581
$ this ->model ->setTemplateSubject ('{{view url="Magento_Theme::favicon.ico"}} ' );
583
582
$ this ->model ->setDesignConfig ([
584
583
'area ' => 'frontend ' ,
@@ -588,10 +587,16 @@ public function testGetProcessedTemplateSubject()
588
587
]);
589
588
590
589
$ 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
+ );
592
594
593
595
$ 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
+ );
595
600
}
596
601
597
602
/**
Original file line number Diff line number Diff line change @@ -477,7 +477,10 @@ public function testGetUrl()
477
477
public function testGetViewFileUrl ()
478
478
{
479
479
$ 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
+ );
481
484
}
482
485
483
486
public function testGetModuleName ()
Original file line number Diff line number Diff line change @@ -20,16 +20,17 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
20
20
21
21
protected function setUp ()
22
22
{
23
- $ this ->_model = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->create (
23
+ $ this ->_model = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->create (
24
24
\Magento \Variable \Model \Variable \Config::class
25
25
);
26
26
}
27
27
28
28
public function testGetWysiwygJsPluginSrc ()
29
29
{
30
30
$ 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
+ );
34
35
}
35
36
}
Original file line number Diff line number Diff line change @@ -43,8 +43,10 @@ public function testGetPluginSettings()
43
43
$ this ->assertArrayHasKey ('widget_window_url ' , $ settings );
44
44
45
45
$ 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
+ );
48
50
49
51
$ this ->assertInternalType ('array ' , $ settings ['widget_placeholders ' ]);
50
52
You can’t perform that action at this time.
0 commit comments