Skip to content

Commit 76b9853

Browse files
author
Spandana Chittimala
committed
Merge branch 'MAGETWO-93497' of https://github.com/magento-mpi/magento2ce into PR-05-28-2019
2 parents 7d79e69 + d7fe695 commit 76b9853

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

app/code/Magento/Cms/Helper/Wysiwyg/Images.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,7 @@ public function getCurrentUrl()
239239
{
240240
if (!$this->_currentUrl) {
241241
$path = $this->getCurrentPath();
242-
$mediaUrl = $this->_storeManager->getStore(
243-
$this->_storeId
244-
)->getBaseUrl(
245-
\Magento\Framework\UrlInterface::URL_TYPE_MEDIA
246-
);
242+
$mediaUrl = $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);
247243
$this->_currentUrl = $mediaUrl . $this->_directory->getRelativePath($path) . '/';
248244
}
249245
return $this->_currentUrl;

dev/tests/integration/testsuite/Magento/Cms/Helper/Wysiwyg/ImagesTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
use Magento\Framework\App\Filesystem\DirectoryList;
99

10+
/**
11+
* @magentoAppArea adminhtml
12+
*/
1013
class ImagesTest extends \PHPUnit\Framework\TestCase
1114
{
1215
public function testGetStorageRoot()
@@ -23,6 +26,12 @@ public function testGetStorageRoot()
2326
$this->assertStringStartsWith($mediaPath, $helper->getStorageRoot());
2427
}
2528

29+
/**
30+
* @magentoConfigFixture default_store admin/url/use_custom 1
31+
* @magentoConfigFixture default_store admin/url/custom http://backend/
32+
* @magentoConfigFixture admin_store web/secure/base_url http://backend/
33+
* @magentoConfigFixture admin_store web/unsecure/base_url http://backend/
34+
*/
2635
public function testGetCurrentUrl()
2736
{
2837
$helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(

0 commit comments

Comments
 (0)