Locale-specific float to string is changed in PHP as per https://wiki.php.net/rfc/locale_independent_float_to_string
This commit is contained in:
parent
e3b9b0d29c
commit
930fdc1b0c
|
@ -54,6 +54,7 @@ class LocaleFloatsTest extends TestCase
|
||||||
preg_match('/(?:double|float)\(([^\)]+)\)/mui', ob_get_clean(), $matches);
|
preg_match('/(?:double|float)\(([^\)]+)\)/mui', ob_get_clean(), $matches);
|
||||||
self::assertArrayHasKey(1, $matches);
|
self::assertArrayHasKey(1, $matches);
|
||||||
$actual = $matches[1];
|
$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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue