From: Rasmus Lerdorf Date: Sun, 26 Jul 2009 07:21:02 +0000 (+0000) Subject: Fix 2 broken json tests. X-Git-Tag: php-5.4.0alpha1~191^2~2962 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=474343657614a2e6b2b036043fd122bbef768059;p=php Fix 2 broken json tests. json_decode() returns a binary string, not unicode for efficiency, and if you are going to test invalid utf8 in a test, you have to stuff it into a binary string or it will be valid unicode by definition. --- diff --git a/ext/json/tests/bug42785.phpt b/ext/json/tests/bug42785.phpt index b3df2fbb28..18646b8809 100644 --- a/ext/json/tests/bug42785.phpt +++ b/ext/json/tests/bug42785.phpt @@ -23,5 +23,5 @@ var_dump(json_encode($bar1)); ?> --EXPECTF-- Deprecated: setlocale(): deprecated in Unicode mode, please use ICU locale functions in %s on line %d -unicode(13) "[100.1,"bar"]" -unicode(21) "{"a":100.1,"b":"foo"}" +string(13) "[100.1,"bar"]" +string(21) "{"a":100.1,"b":"foo"}" diff --git a/ext/json/tests/bug43941.phpt b/ext/json/tests/bug43941.phpt index 7cabdaf4a9..049c207654 100644 --- a/ext/json/tests/bug43941.phpt +++ b/ext/json/tests/bug43941.phpt @@ -5,10 +5,10 @@ Bug #43941 (json_encode() invalid UTF-8) --FILE--