File tree Expand file tree Collapse file tree 4 files changed +5
-34
lines changed
app/code/Magento/Cms/Model/Wysiwyg
static/testsuite/Magento/Test/Legacy/_files Expand file tree Collapse file tree 4 files changed +5
-34
lines changed Original file line number Diff line number Diff line change @@ -195,16 +195,6 @@ public function getConfig($data = [])
195
195
return $ config ;
196
196
}
197
197
198
- /**
199
- * Return URL for skin images placeholder
200
- *
201
- * @return string
202
- */
203
- public function getSkinImagePlaceholderUrl ()
204
- {
205
- return $ this ->_assetRepo ->getUrl (self ::WYSIWYG_SKIN_IMAGE_PLACEHOLDER_ID );
206
- }
207
-
208
198
/**
209
199
* Return path for skin images placeholder
210
200
*
Original file line number Diff line number Diff line change 2008
2008
],
2009
2009
['getLinksConfig ' , 'Magento\Downloadable\Block\Catalog\Product\Links ' ],
2010
2010
['getAuthorizationAmounts ' , 'Magento\Paypal\Model\Config ' ],
2011
- ['cleanTransactions ' , 'Magento\Paypal\Model\Observer ' ]
2011
+ ['cleanTransactions ' , 'Magento\Paypal\Model\Observer ' ],
2012
+ ['getSkinImagePlaceholderUrl ' , 'Magento\Cms\Model\Wysiwyg\Config ' ]
2012
2013
];
Original file line number Diff line number Diff line change 9
9
*/
10
10
class ConfigTest extends \PHPUnit_Framework_TestCase
11
11
{
12
- const WYSIWYG_SKIN_IMAGE_PLACEHOLDER_ID = 'Magento_Cms::images/wysiwyg_skin_image.png ' ;
13
-
14
12
/**
15
13
* @var \Magento\Cms\Model\Wysiwyg\Config
16
14
*/
@@ -187,21 +185,6 @@ public function getConfigDataProvider()
187
185
];
188
186
}
189
187
190
- /**
191
- * @covers \Magento\Cms\Model\Wysiwyg\Config::getSkinImagePlaceholderUrl
192
- */
193
- public function testGetSkinImagePlaceholderUrl ()
194
- {
195
- $ url = '/some/url ' ;
196
-
197
- $ this ->assetRepoMock ->expects ($ this ->atLeastOnce ())
198
- ->method ('getUrl ' )
199
- ->with (self ::WYSIWYG_SKIN_IMAGE_PLACEHOLDER_ID )
200
- ->willReturn ($ url );
201
-
202
- $ this ->assertEquals ($ url , $ this ->wysiwygConfig ->getSkinImagePlaceholderUrl ());
203
- }
204
-
205
188
/**
206
189
* @covers \Magento\Cms\Model\Wysiwyg\Config::getSkinImagePlaceholderPath
207
190
*/
@@ -219,7 +202,7 @@ public function testGetSkinImagePlaceholderPath()
219
202
->willReturn ($ staticPath );
220
203
$ this ->assetRepoMock ->expects ($ this ->any ())
221
204
->method ('createAsset ' )
222
- ->with (self ::WYSIWYG_SKIN_IMAGE_PLACEHOLDER_ID )
205
+ ->with (\ Magento \ Cms \ Model \ Wysiwyg \Config ::WYSIWYG_SKIN_IMAGE_PLACEHOLDER_ID )
223
206
->willReturn ($ this ->assetFileMock );
224
207
$ this ->assetFileMock ->expects ($ this ->once ())
225
208
->method ('getPath ' )
Original file line number Diff line number Diff line change 12
12
*/
13
13
class StoreTest extends \PHPUnit_Framework_TestCase
14
14
{
15
- const MEDIA = 'media ' ;
16
- const STATIC_VIEW = 'static ' ;
17
-
18
15
/**
19
16
* @var \Magento\Store\Model\Store
20
17
*/
@@ -604,7 +601,7 @@ public function testGetBaseMediaDir()
604
601
$ expectedResult = 'pub/media ' ;
605
602
$ this ->filesystemMock ->expects ($ this ->once ())
606
603
->method ('getUri ' )
607
- ->with (self ::MEDIA )
604
+ ->with (\ Magento \ Framework \ App \ Filesystem \DirectoryList ::MEDIA )
608
605
->willReturn ($ expectedResult );
609
606
$ this ->assertEquals ($ expectedResult , $ this ->store ->getBaseMediaDir ());
610
607
}
@@ -617,7 +614,7 @@ public function testGetBaseStaticDir()
617
614
$ expectedResult = 'pub/static ' ;
618
615
$ this ->filesystemMock ->expects ($ this ->once ())
619
616
->method ('getUri ' )
620
- ->with (self ::STATIC_VIEW )
617
+ ->with (\ Magento \ Framework \ App \ Filesystem \DirectoryList ::STATIC_VIEW )
621
618
->willReturn ($ expectedResult );
622
619
$ this ->assertEquals ($ expectedResult , $ this ->store ->getBaseStaticDir ());
623
620
}
You can’t perform that action at this time.
0 commit comments