From 930fdc1b0c0f3ef3bbeb50641997e1a330de0402 Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Fri, 9 Oct 2020 15:59:59 +0200 Subject: [PATCH] Locale-specific float to string is changed in PHP as per https://wiki.php.net/rfc/locale_independent_float_to_string --- tests/PhpSpreadsheetTests/Writer/Xlsx/LocaleFloatsTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/PhpSpreadsheetTests/Writer/Xlsx/LocaleFloatsTest.php b/tests/PhpSpreadsheetTests/Writer/Xlsx/LocaleFloatsTest.php index 81d4a777..83defb7b 100644 --- a/tests/PhpSpreadsheetTests/Writer/Xlsx/LocaleFloatsTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Xlsx/LocaleFloatsTest.php @@ -54,6 +54,7 @@ class LocaleFloatsTest extends TestCase preg_match('/(?:double|float)\(([^\)]+)\)/mui', ob_get_clean(), $matches); self::assertArrayHasKey(1, $matches); $actual = $matches[1]; - self::assertEquals('1,1', $actual); + // From PHP8, https://wiki.php.net/rfc/locale_independent_float_to_string applies + self::assertEquals((\PHP_VERSION_ID < 80000) ? '1,1' : '1.1', $actual); } }