Skip to content

Commit d949055

Browse files
committed
MAGETWO-49618: [GitHub] Product Save & Duplicate Unexpected Behavior for Multiple Store Views #3426
1 parent dd5610d commit d949055

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/ValidateTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,20 @@ protected function setUp()
121121
->getMock();
122122
$this->resultJsonFactory->expects($this->any())->method('create')->willReturn($this->resultJson);
123123

124+
$storeManagerInterfaceMock = $this->getMockForAbstractClass(
125+
'Magento\Store\Model\StoreManagerInterface',
126+
[],
127+
'',
128+
false,
129+
true,
130+
true,
131+
['getStore', 'getCode']
132+
);
133+
134+
$storeManagerInterfaceMock->expects($this->any())
135+
->method('getStore')
136+
->will($this->returnSelf());
137+
124138
$additionalParams = ['resultRedirectFactory' => $this->resultRedirectFactory];
125139
$this->action = (new ObjectManagerHelper($this))->getObject(
126140
'Magento\Catalog\Controller\Adminhtml\Product\Validate',
@@ -132,6 +146,7 @@ protected function setUp()
132146
'initializationHelper' => $this->initializationHelper,
133147
'resultJsonFactory' => $this->resultJsonFactory,
134148
'productFactory' => $this->productFactory,
149+
'storeManager' => $storeManagerInterfaceMock,
135150
]
136151
);
137152
}

0 commit comments

Comments
 (0)