Skip to content

Commit 766908f

Browse files
committed
Fixed float comparison precision, because sebastianbergmann/comparator removed DoubleComparator
1 parent aca8e8e commit 766908f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/SalesRule/Test/Unit/Model/Rule/Action/Discount/ToPercentTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ public function calculateDataProvider()
223223
'expectedRuleDiscountQty' => 100,
224224
'expectedDiscountData' => [
225225
'amount' => 98,
226-
'baseAmount' => 59.5,
227-
'originalAmount' => 119,
226+
'baseAmount' => 59.49999999999999,
227+
'originalAmount' => 118.99999999999999,
228228
'baseOriginalAmount' => 80.5,
229229
],
230230
]

app/code/Magento/Tax/Test/Unit/Model/Plugin/OrderSaveTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected function setupExtensionAttributeMock(): MockObject
108108
{
109109
$orderExtensionAttributeMock = $this->getMockBuilder(OrderExtensionInterface::class)
110110
->disableOriginalConstructor()
111-
->onlyMethods(
111+
->addMethods(
112112
[
113113
'getAppliedTaxes',
114114
'getConvertingFromQuote',

0 commit comments

Comments
 (0)