Skip to content

Commit dadfe1c

Browse files
committed
MAGETWO-50552: Four decimal characters saved in new product attribute with type "Price"
- Changed expectations in unit test;
1 parent 53680f7 commit dadfe1c

File tree

1 file changed

+11
-11
lines changed
  • app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier

1 file changed

+11
-11
lines changed

app/code/Magento/Catalog/Test/Unit/Ui/DataProvider/Product/Form/Modifier/EavTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,10 @@ public function testModifyData()
276276
$this->productMock->expects($this->any())
277277
->method('getId')
278278
->willReturn(1);
279-
$this->productMock->expects($this->any())
279+
$this->productMock->expects($this->once())
280280
->method('getAttributeSetId')
281281
->willReturn(4);
282-
$this->productMock->expects($this->any())
282+
$this->productMock->expects($this->once())
283283
->method('getData')
284284
->with(ProductAttributeInterface::CODE_PRICE)->willReturn('19.9900');
285285

@@ -292,47 +292,47 @@ public function testModifyData()
292292
$this->attributeGroupRepositoryMock->expects($this->any())
293293
->method('getList')
294294
->willReturn($this->searchCriteriaMock);
295-
$this->searchCriteriaMock->expects($this->any())
295+
$this->searchCriteriaMock->expects($this->once())
296296
->method('getItems')
297297
->willReturn([$this->attributeGroupMock]);
298-
$this->sortOrderBuilderMock->expects($this->any())
298+
$this->sortOrderBuilderMock->expects($this->once())
299299
->method('setField')
300300
->willReturnSelf();
301-
$this->sortOrderBuilderMock->expects($this->any())
301+
$this->sortOrderBuilderMock->expects($this->once())
302302
->method('setAscendingDirection')
303303
->willReturnSelf();
304304
$dataObjectMock = $this->getMock('\Magento\Framework\Api\AbstractSimpleObject', [], [], '', false);
305-
$this->sortOrderBuilderMock->expects($this->any())
305+
$this->sortOrderBuilderMock->expects($this->once())
306306
->method('create')
307307
->willReturn($dataObjectMock);
308308

309309
$this->searchCriteriaBuilderMock->expects($this->any())
310310
->method('addFilter')
311311
->willReturnSelf();
312-
$this->searchCriteriaBuilderMock->expects($this->any())
312+
$this->searchCriteriaBuilderMock->expects($this->once())
313313
->method('addSortOrder')
314314
->willReturnSelf();
315315
$this->searchCriteriaBuilderMock->expects($this->any())
316316
->method('create')
317317
->willReturn($this->searchCriteriaMock);
318318

319-
$this->attributeRepositoryMock->expects($this->any())
319+
$this->attributeRepositoryMock->expects($this->once())
320320
->method('getList')
321321
->with($this->searchCriteriaMock)
322322
->willReturn($this->searchResultsMock);
323323
$this->eavAttributeMock->expects($this->any())
324324
->method('getAttributeGroupCode')
325325
->willReturn('product-details');
326-
$this->eavAttributeMock->expects($this->any())
326+
$this->eavAttributeMock->expects($this->once())
327327
->method('getApplyTo')
328328
->willReturn([]);
329-
$this->eavAttributeMock->expects($this->any())
329+
$this->eavAttributeMock->expects($this->once())
330330
->method('getFrontendInput')
331331
->willReturn(ProductAttributeInterface::CODE_PRICE);
332332
$this->eavAttributeMock->expects($this->any())
333333
->method('getAttributeCode')
334334
->willReturn(ProductAttributeInterface::CODE_PRICE);
335-
$this->searchResultsMock->expects($this->any())
335+
$this->searchResultsMock->expects($this->once())
336336
->method('getItems')
337337
->willReturn([$this->eavAttributeMock]);
338338

0 commit comments

Comments
 (0)