From: Christoph M. Becker Date: Mon, 29 Jun 2015 16:25:30 +0000 (+0200) Subject: Merge branch 'PHP-5.6' X-Git-Tag: php-7.1.0alpha3~25^2~107 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df8f3a0eaa2d8d75122cb45ada2043fd69814984;p=php Merge branch 'PHP-5.6' * PHP-5.6: adding another testing scenario without coverage in setlocale function --- df8f3a0eaa2d8d75122cb45ada2043fd69814984 diff --cc ext/standard/tests/strings/setlocale_error.phpt index ca46764ed1,99abfcaeb9..a6a8e38205 --- a/ext/standard/tests/strings/setlocale_error.phpt +++ b/ext/standard/tests/strings/setlocale_error.phpt @@@ -35,6 -35,15 +35,10 @@@ echo "\n-- Testing setlocale() functio //Invalid array of locales var_dump( setlocale(LC_ALL,"en_US.invalid", "en_AU.invalid", "ko_KR.invalid") ); -echo "\n-- Testing setlocale() function with invalid category --\n"; -//invalid $category -$invalid_category = "TEST"; -var_dump( setlocale($invalid_category,"en_US.utf8") ); - + echo "\n-- Testing setlocale() function with locale name too long, 'category' = LC_ALL --"; + //Invalid locale - locale name too long + var_dump(setlocale(LC_ALL,str_pad('',255,'A'))); + echo "\nDone"; ?> --EXPECTF-- @@@ -54,4 -63,15 +58,8 @@@ bool(false -- Testing setlocale() function with invalid multiple locales, 'category' = LC_ALL -- bool(false) --- Testing setlocale() function with invalid category -- - -Deprecated: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead in %s on line %d - -Warning: setlocale(): Invalid locale category name TEST, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME in %s on line %d -bool(false) - + -- Testing setlocale() function with locale name too long, 'category' = LC_ALL -- + Warning: setlocale(): Specified locale name is too long in %s on line %d + bool(false) + Done