Skip to content
Snippets Groups Projects
Commit 8e426fe9 authored by RomanKis's avatar RomanKis
Browse files

12482: Sitemap image links in MultiStore

parent e6e275be
No related merge requests found
......@@ -273,6 +273,7 @@ class Sitemap extends \Magento\Framework\Model\AbstractModel implements \Magento
/** @var $helper \Magento\Sitemap\Helper\Data */
$helper = $this->_sitemapData;
$storeId = $this->getStoreId();
$this->_storeManager->setCurrentStore($storeId);
$this->addSitemapItem(new DataObject(
[
......
......@@ -253,6 +253,8 @@ class SitemapTest extends \PHPUnit\Framework\TestCase
$expectedWrites,
null
);
$this->storeManagerMock->expects($this->once())->method('setCurrentStore')->with(1);
$model->generateXml();
$this->assertCount(count($expectedFile), $actualData, 'Number of generated files is incorrect');
......@@ -360,6 +362,8 @@ class SitemapTest extends \PHPUnit\Framework\TestCase
$expectedWrites,
$robotsInfo
);
$this->storeManagerMock->expects($this->once())->method('setCurrentStore')->with(1);
$model->generateXml();
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment