Skip to content

Commit 8110f5f

Browse files
torreytsuimage2pratik
authored andcommitted
Test price at 0 against resolvePrice()
1 parent f500af3 commit 8110f5f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

app/code/Magento/ConfigurableProduct/Test/Unit/Pricing/Price/ConfigurablePriceResolverTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,28 @@ public function resolvePriceDataProvider()
100100
],
101101
$expectedPrice = 5.00,
102102
],
103+
'Single variants at price null (null), should return 0.00 (float)' => [
104+
$variantPrices = [
105+
null,
106+
],
107+
$expectedPrice = 0.00,
108+
],
109+
'Multiple variants at price 0, 10, 20, should return 0.00 (float)' => [
110+
$variantPrices = [
111+
0,
112+
10,
113+
20,
114+
],
115+
$expectedPrice = 0.00,
116+
],
117+
'Multiple variants at price 10, 0, 20, should return 0.00 (float)' => [
118+
$variantPrices = [
119+
10,
120+
0,
121+
20,
122+
],
123+
$expectedPrice = 0.00,
124+
],
103125
];
104126
}
105127
}

0 commit comments

Comments
 (0)