Skip to content

Commit 9b6d019

Browse files
author
Yuri Kovsher
committed
MAGETWO-21201: CLONE - Apply SUPEE-1805: Issue with disablign allow_url_fopen using the CMS WYSIWYG editor (patch)
1 parent 90f0f85 commit 9b6d019

File tree

4 files changed

+5
-34
lines changed

4 files changed

+5
-34
lines changed

app/code/Magento/Cms/Model/Wysiwyg/Config.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -195,16 +195,6 @@ public function getConfig($data = [])
195195
return $config;
196196
}
197197

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-
208198
/**
209199
* Return path for skin images placeholder
210200
*

dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2008,5 +2008,6 @@
20082008
],
20092009
['getLinksConfig', 'Magento\Downloadable\Block\Catalog\Product\Links'],
20102010
['getAuthorizationAmounts', 'Magento\Paypal\Model\Config'],
2011-
['cleanTransactions', 'Magento\Paypal\Model\Observer']
2011+
['cleanTransactions', 'Magento\Paypal\Model\Observer'],
2012+
['getSkinImagePlaceholderUrl', 'Magento\Cms\Model\Wysiwyg\Config']
20122013
];

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

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
*/
1010
class ConfigTest extends \PHPUnit_Framework_TestCase
1111
{
12-
const WYSIWYG_SKIN_IMAGE_PLACEHOLDER_ID = 'Magento_Cms::images/wysiwyg_skin_image.png';
13-
1412
/**
1513
* @var \Magento\Cms\Model\Wysiwyg\Config
1614
*/
@@ -187,21 +185,6 @@ public function getConfigDataProvider()
187185
];
188186
}
189187

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-
205188
/**
206189
* @covers \Magento\Cms\Model\Wysiwyg\Config::getSkinImagePlaceholderPath
207190
*/
@@ -219,7 +202,7 @@ public function testGetSkinImagePlaceholderPath()
219202
->willReturn($staticPath);
220203
$this->assetRepoMock->expects($this->any())
221204
->method('createAsset')
222-
->with(self::WYSIWYG_SKIN_IMAGE_PLACEHOLDER_ID)
205+
->with(\Magento\Cms\Model\Wysiwyg\Config::WYSIWYG_SKIN_IMAGE_PLACEHOLDER_ID)
223206
->willReturn($this->assetFileMock);
224207
$this->assetFileMock->expects($this->once())
225208
->method('getPath')

dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
*/
1313
class StoreTest extends \PHPUnit_Framework_TestCase
1414
{
15-
const MEDIA = 'media';
16-
const STATIC_VIEW = 'static';
17-
1815
/**
1916
* @var \Magento\Store\Model\Store
2017
*/
@@ -604,7 +601,7 @@ public function testGetBaseMediaDir()
604601
$expectedResult = 'pub/media';
605602
$this->filesystemMock->expects($this->once())
606603
->method('getUri')
607-
->with(self::MEDIA)
604+
->with(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA)
608605
->willReturn($expectedResult);
609606
$this->assertEquals($expectedResult, $this->store->getBaseMediaDir());
610607
}
@@ -617,7 +614,7 @@ public function testGetBaseStaticDir()
617614
$expectedResult = 'pub/static';
618615
$this->filesystemMock->expects($this->once())
619616
->method('getUri')
620-
->with(self::STATIC_VIEW)
617+
->with(\Magento\Framework\App\Filesystem\DirectoryList::STATIC_VIEW)
621618
->willReturn($expectedResult);
622619
$this->assertEquals($expectedResult, $this->store->getBaseStaticDir());
623620
}

0 commit comments

Comments
 (0)