diff --git a/Service/Order/Lines/Order.php b/Service/Order/Lines/Order.php index 592949fb22e..ec28e4646be 100644 --- a/Service/Order/Lines/Order.php +++ b/Service/Order/Lines/Order.php @@ -1,5 +1,5 @@ assertEquals('discount', $lastLine['type']); - $this->assertEquals($adjustment, $lastLine['totalAmount']['value']); + $this->assertEquals(round($adjustment, 2), $lastLine['totalAmount']['value']); $total = 0; foreach ($result as $orderLine) { $total += $orderLine['totalAmount']['value']; } - $this->assertEquals($order->getBaseGrandTotal(), $total); + $this->assertEquals( + round($order->getBaseGrandTotal(), 2), + $total + ); } /** @@ -242,6 +245,8 @@ public function adjustmentsDataProvider(): array [-0.03], [-0.02], [-0.01], + [0.0051111111], // Rounds up to 0.1, so valid + [0.0099999999], // Rounds up to 0.1, so valid [0.01], [0.02], [0.03],