From 6e49c60ad377f9a614fca602012a30db6248c8ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 26 Sep 2022 13:57:50 +0200 Subject: [PATCH] Fixed testsuite with sebastian/comparator release --- tests/Unit/Classes/Tax/TaxCalculatorCoreTest.php | 2 +- tests/Unit/Classes/ToolsTest.php | 2 +- tests/Unit/Core/Cart/AmountImmutableTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Unit/Classes/Tax/TaxCalculatorCoreTest.php b/tests/Unit/Classes/Tax/TaxCalculatorCoreTest.php index 0131b08153c66..2c4ee38b727ba 100644 --- a/tests/Unit/Classes/Tax/TaxCalculatorCoreTest.php +++ b/tests/Unit/Classes/Tax/TaxCalculatorCoreTest.php @@ -61,6 +61,6 @@ public function testGetTotalRateBug() $totalRate = $tax_calculator->getTotalRate(); - $this->assertEquals(27.233, $totalRate); + $this->assertEquals(27.232999999999997, $totalRate); } } diff --git a/tests/Unit/Classes/ToolsTest.php b/tests/Unit/Classes/ToolsTest.php index 5c537f2d97d18..4e35db5858d55 100644 --- a/tests/Unit/Classes/ToolsTest.php +++ b/tests/Unit/Classes/ToolsTest.php @@ -247,7 +247,7 @@ public function providerSpreadAmount(): array 'a', ], [ - [['a' => 7.69], ['a' => 4.09], ['a' => 1.8]], + [['a' => 7.6899999999999995], ['a' => 4.09], ['a' => 1.7999999999999998]], -0.32, 2, [['a' => 7.8], ['a' => 4.2], ['a' => 1.9]], 'a', diff --git a/tests/Unit/Core/Cart/AmountImmutableTest.php b/tests/Unit/Core/Cart/AmountImmutableTest.php index b1d810341287f..0ef6807ac3f6b 100644 --- a/tests/Unit/Core/Cart/AmountImmutableTest.php +++ b/tests/Unit/Core/Cart/AmountImmutableTest.php @@ -53,7 +53,7 @@ public function testAdd(): void $this->assertEquals(4.6, $amount1->getTaxIncluded()); $this->assertEquals(7.2, $amount1->getTaxExcluded()); - $this->assertEquals(6.9, $amount2->getTaxIncluded()); + $this->assertEquals(6.8999999999999995, $amount2->getTaxIncluded()); $this->assertEquals(10.7, $amount2->getTaxExcluded()); }