File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed
app/code/Magento/ProductAlert/Test/Unit Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -12,16 +12,6 @@ class ImageProviderTest extends \PHPUnit\Framework\TestCase
12
12
*/
13
13
private $ imageBuilderMock ;
14
14
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
-
25
15
/**
26
16
* @var \Magento\ProductAlert\Block\Product\ImageProvider
27
17
*/
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ protected function setUp()
168
168
);
169
169
$ this ->storeMock = $ this ->getMockBuilder (\Magento \Store \Model \Store::class)
170
170
->disableOriginalConstructor ()
171
- ->setMethods (['getDefaultStore ' , 'getId ' ])
171
+ ->setMethods (['getDefaultStore ' , 'getId ' , ' setWebsiteId ' ])
172
172
->getMock ();
173
173
$ this ->customerRepositoryMock = $ this ->getMockBuilder (\Magento \Customer \Api \CustomerRepositoryInterface::class)
174
174
->getMock ();
@@ -285,12 +285,13 @@ public function testProcessPriceEmailThrowsException()
285
285
$ this ->storeMock ->expects ($ this ->any ())->method ('getDefaultStore ' )->willReturnSelf ();
286
286
$ this ->websiteMock ->expects ($ this ->once ())->method ('getDefaultStore ' )->willReturn ($ this ->storeMock );
287
287
$ this ->storeMock ->expects ($ this ->any ())->method ('getId ' )->willReturn (2 );
288
+ $ this ->storeMock ->expects ($ this ->any ())->method ('setWebsiteId ' )->willReturnSelf ();
288
289
289
290
$ this ->scopeConfigMock ->expects ($ this ->once ())->method ('getValue ' )->willReturn (true );
290
291
291
292
$ this ->priceColFactoryMock ->expects ($ this ->once ())->method ('create ' )->willReturnSelf ();
292
293
$ this ->priceColFactoryMock ->expects ($ this ->once ())->method ('addWebsiteFilter ' )->willReturnSelf ();
293
-
294
+ $ this -> storeManagerMock -> expects ( $ this -> any ())-> method ( ' getStore ' )-> willReturn ( $ this -> storeMock );
294
295
$ items = [
295
296
new \Magento \Framework \DataObject ([
296
297
'customer_id ' => $ id
You can’t perform that action at this time.
0 commit comments