From 8c8be024a3a7e048b9f5c3f30ccc59a67d98de86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 3 Aug 2021 14:36:18 +0200 Subject: [PATCH] Tests for number_format used in Mollie --- tests/Unit/MollieAmountFormatTest.php | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/Unit/MollieAmountFormatTest.php diff --git a/tests/Unit/MollieAmountFormatTest.php b/tests/Unit/MollieAmountFormatTest.php new file mode 100644 index 000000000000..147d4e21218b --- /dev/null +++ b/tests/Unit/MollieAmountFormatTest.php @@ -0,0 +1,32 @@ +assertEquals('1000.00', \number_format((float) 1000, 2, '.', '')); + + $this->assertEquals('1000.00', \number_format((float) "1000", 2, '.', '')); + + $this->assertEquals('1000.00', \number_format((float) "1000.00", 2, '.', '')); + + $this->assertEquals('1000.00', \number_format((float) "1000.00000", 2, '.', '')); + } +}