Skip to content

Commit

Permalink
MAGETWO-44971: [GITHUB] Configurable product issues after saving #2226
Browse files Browse the repository at this point in the history
- fix unit test
  • Loading branch information
Andrii Lugovyi committed Nov 23, 2015
1 parent cbf9699 commit d3a8572
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ConfigurableTest extends \PHPUnit_Framework_TestCase
protected $requestMock;

/**
* @var \PHPUnit_Framework_MockObject_MockObject
* @var \PHPUnit_Framework_MockObject_MockObject | Magento\Catalog\Model\Product
*/
protected $productMock;

Expand All @@ -46,6 +46,7 @@ protected function setUp()
'setNewVariationsAttributeSetId',
'setAssociatedProductIds',
'setCanSaveConfigurableAttributes',
'getTypeId',
'__wakeup',
];
$this->productMock = $this->getMock('Magento\Catalog\Model\Product', $methods, [], '', false);
Expand Down Expand Up @@ -86,6 +87,7 @@ public function testAfterInitializeIfAttributesNotEmptyAndActionNameNotGenerateV
$attributes,
$this->productMock
);
$this->productMock->expects($this->once())->method('getTypeId')->willReturn('configurable');
$this->productMock->expects($this->once())->method('setNewVariationsAttributeSetId')->with($postValue);
$this->productTypeMock->expects(
$this->once()
Expand Down Expand Up @@ -118,6 +120,7 @@ public function testAfterInitializeIfAttributesNotEmptyAndActionNameGenerateVari
['attributes', null, $attributes],
];
$this->requestMock->expects($this->any())->method('getParam')->will($this->returnValueMap($paramValueMap));
$this->productMock->expects($this->once())->method('getTypeId')->willReturn('configurable');
$this->productTypeMock->expects(
$this->once()
)->method(
Expand Down

0 comments on commit d3a8572

Please sign in to comment.