Skip to content

Commit

Permalink
12482: Sitemap image links in MultiStore
Browse files Browse the repository at this point in the history
  • Loading branch information
RomaKis committed Nov 30, 2017
1 parent e6e275b commit 8e426fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/code/Magento/Sitemap/Model/Sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ public function collectSitemapItems()
/** @var $helper \Magento\Sitemap\Helper\Data */
$helper = $this->_sitemapData;
$storeId = $this->getStoreId();
$this->_storeManager->setCurrentStore($storeId);

$this->addSitemapItem(new DataObject(
[
Expand Down
4 changes: 4 additions & 0 deletions app/code/Magento/Sitemap/Test/Unit/Model/SitemapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ public function testGenerateXml($maxLines, $maxFileSize, $expectedFile, $expecte
$expectedWrites,
null
);
$this->storeManagerMock->expects($this->once())->method('setCurrentStore')->with(1);

$model->generateXml();

$this->assertCount(count($expectedFile), $actualData, 'Number of generated files is incorrect');
Expand Down Expand Up @@ -360,6 +362,8 @@ public function testAddSitemapToRobotsTxt($maxLines, $maxFileSize, $expectedFile
$expectedWrites,
$robotsInfo
);
$this->storeManagerMock->expects($this->once())->method('setCurrentStore')->with(1);

$model->generateXml();
}

Expand Down

0 comments on commit 8e426fe

Please sign in to comment.