Skip to content

Commit fe1078e

Browse files
author
Oleksandr Dubovyk
committed
MC-30461: Product Price Changes Email Shows Incorrect Item Pricing
- modified test - static
1 parent 44efd39 commit fe1078e

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

app/code/Magento/ProductAlert/Test/Unit/Block/Product/ImageProviderTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@ class ImageProviderTest extends \PHPUnit\Framework\TestCase
1212
*/
1313
private $imageBuilderMock;
1414

15-
/**
16-
* @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject
17-
*/
18-
private $storeManagerMock;
19-
20-
/**
21-
* @var \Magento\Store\Model\App\Emulation|\PHPUnit_Framework_MockObject_MockObject
22-
*/
23-
private $emulationMock;
24-
2515
/**
2616
* @var \Magento\ProductAlert\Block\Product\ImageProvider
2717
*/

app/code/Magento/ProductAlert/Test/Unit/Model/ObserverTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ protected function setUp()
168168
);
169169
$this->storeMock = $this->getMockBuilder(\Magento\Store\Model\Store::class)
170170
->disableOriginalConstructor()
171-
->setMethods(['getDefaultStore', 'getId'])
171+
->setMethods(['getDefaultStore', 'getId', 'setWebsiteId'])
172172
->getMock();
173173
$this->customerRepositoryMock = $this->getMockBuilder(\Magento\Customer\Api\CustomerRepositoryInterface::class)
174174
->getMock();
@@ -285,12 +285,13 @@ public function testProcessPriceEmailThrowsException()
285285
$this->storeMock->expects($this->any())->method('getDefaultStore')->willReturnSelf();
286286
$this->websiteMock->expects($this->once())->method('getDefaultStore')->willReturn($this->storeMock);
287287
$this->storeMock->expects($this->any())->method('getId')->willReturn(2);
288+
$this->storeMock->expects($this->any())->method('setWebsiteId')->willReturnSelf();
288289

289290
$this->scopeConfigMock->expects($this->once())->method('getValue')->willReturn(true);
290291

291292
$this->priceColFactoryMock->expects($this->once())->method('create')->willReturnSelf();
292293
$this->priceColFactoryMock->expects($this->once())->method('addWebsiteFilter')->willReturnSelf();
293-
294+
$this->storeManagerMock->expects($this->any())->method('getStore')->willReturn($this->storeMock);
294295
$items = [
295296
new \Magento\Framework\DataObject([
296297
'customer_id' => $id

0 commit comments

Comments
 (0)