Skip to content

Commit

Permalink
MAGETWO-85285: 12482: Sitemap image links in MultiStore #935
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Korshenko authored Dec 11, 2017
2 parents 066d21a + 84e49c8 commit 7412e61
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 7412e61

Please sign in to comment.