Skip to content

Commit c2baa1f

Browse files
author
Sergey Shvets
committed
MAGETWO-55814: East team cadenece 3 PR
Fixed unit tests
1 parent c809a71 commit c2baa1f

File tree

1 file changed

+5
-3
lines changed
  • app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Attribute

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ protected function getModel()
104104
'resultPageFactory' => $this->resultPageFactoryMock,
105105
'resultJsonFactory' => $this->resultJsonFactoryMock,
106106
'layoutFactory' => $this->layoutFactoryMock,
107+
'multipleAttributeList' => ['select' => 'option']
107108
]);
108109
}
109110

@@ -152,20 +153,21 @@ public function testExecute()
152153
* @dataProvider provideUniqueData
153154
* @param array $options
154155
* @param boolean $isError
156+
* @throws \Magento\Framework\Exception\NotFoundException
155157
*/
156158
public function testUniqueValidation(array $options, $isError)
157159
{
158-
$countFunctionCalls = ($isError) ? 5 : 4;
160+
$countFunctionCalls = ($isError) ? 6 : 5;
159161
$this->requestMock->expects($this->exactly($countFunctionCalls))
160162
->method('getParam')
161163
->willReturnMap([
162-
['frontend_label', null, 'test_frontend_label'],
164+
['frontend_label', null, null],
163165
['attribute_code', null, "test_attribute_code"],
164166
['new_attribute_set_name', null, 'test_attribute_set_name'],
165167
['option', null, $options],
166168
['message_key', null, Validate::DEFAULT_MESSAGE_KEY]
167169
]);
168-
170+
169171
$this->objectManagerMock->expects($this->once())
170172
->method('create')
171173
->willReturn($this->attributeMock);

0 commit comments

Comments
 (0)