Skip to content

Commit 9dc34f0

Browse files
author
Yu Tang
committed
MAGETWO-28254: ConfigurableProduct Integration API
- Fix unit test failure
1 parent ea95e7d commit 9dc34f0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

app/code/Magento/ConfigurableProduct/Test/Unit/Model/Plugin/AroundProductRepositorySaveTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,17 @@ public function testAroundSaveWithOptions()
436436
->method('deleteById')
437437
->with($productSku, 4);
438438

439+
$configurableProductTypeMock = $this->getMockBuilder(
440+
'\Magento\ConfigurableProduct\Model\Product\Type\Configurable'
441+
)->disableOriginalConstructor()->getMock();
442+
$configurableProductTypeMock->expects($this->once())
443+
->method('resetConfigurableAttributes')
444+
->with($this->productMock)
445+
->willReturnSelf();
446+
$this->productMock->expects($this->any())
447+
->method('getTypeInstance')
448+
->willReturn($configurableProductTypeMock);
449+
439450
$productId = 3;
440451
$this->productMock->expects($this->once())
441452
->method('getId')

0 commit comments

Comments
 (0)