From 9eafbd0ad912e8839ddbac59c9a2932423f72358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 15 Mar 2021 16:21:59 +0200 Subject: [PATCH] fixup! fixup! fixup! fixup! Restore locales before calling assertions --- tests/Zend/Validate/FloatTest.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/Zend/Validate/FloatTest.php b/tests/Zend/Validate/FloatTest.php index 52194bc6e..bb5245afb 100644 --- a/tests/Zend/Validate/FloatTest.php +++ b/tests/Zend/Validate/FloatTest.php @@ -185,7 +185,8 @@ public function testPhpLocaleDeFloatType() */ public function testPhpLocaleFrFloatType() { - $locale = setlocale(LC_ALL, 'fr'); + $locale = setlocale(LC_ALL, 0); + setlocale(LC_ALL, 'fr'); $valid = new Zend_Validate_Float(); $isValid = $valid->isValid(10.5); setlocale(LC_ALL, $locale); @@ -197,8 +198,10 @@ public function testPhpLocaleFrFloatType() */ public function testPhpLocaleDeStringType() { - $lcAll = setlocale(LC_ALL, 'de_AT'); - $lcNumeric = setlocale(LC_NUMERIC, 'de_AT'); + $lcAll = setlocale(LC_ALL, 0); + setlocale(LC_ALL, 'de_AT'); + $lcNumeric = setlocale(LC_NUMERIC, 0); + setlocale(LC_NUMERIC, 'de_AT'); $valid = new Zend_Validate_Float('de_AT'); $isValid0 = $valid->isValid('1,3'); $isValid1 = $valid->isValid('1000,3');