Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 2596ad5

Browse files
bordeoMastiuhin Oleksandr
authored andcommitted
change test result and use float on qty validators
1 parent a2c1a64 commit 2596ad5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/CatalogInventory/Block/Plugin/ProductView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function afterGetQuantityValidators(
4040
$params = [];
4141
$params['minAllowed'] = (float)$stockItem->getMinSaleQty();
4242
if ($stockItem->getMaxSaleQty()) {
43-
$params['maxAllowed'] = $stockItem->getMaxSaleQty();
43+
$params['maxAllowed'] = (float)$stockItem->getMaxSaleQty();
4444
}
4545
if ($stockItem->getQtyIncrements() > 0) {
4646
$params['qtyIncrements'] = (float)$stockItem->getQtyIncrements();

app/code/Magento/CatalogInventory/Test/Unit/Block/Plugin/ProductViewTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public function testAfterGetQuantityValidators()
4848
'validate-item-quantity' =>
4949
[
5050
'minAllowed' => 0.5,
51-
'maxAllowed' => 5,
52-
'qtyIncrements' => 3
51+
'maxAllowed' => 5.0,
52+
'qtyIncrements' => 3.0
5353
]
5454
];
5555
$validators = [];

0 commit comments

Comments
 (0)