wharmby Fri Jan 23 20:23:26 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/json/tests 001.phpt bug46215.phpt Log: Fix tests. Add missing SKIPIF. Tested on Windows, Linux and Linux 64 http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/001.phpt?r1=1.1.2.5&r2=1.1.2.6&diff_format=u Index: php-src/ext/json/tests/001.phpt diff -u php-src/ext/json/tests/001.phpt:1.1.2.5 php-src/ext/json/tests/001.phpt:1.1.2.6 --- php-src/ext/json/tests/001.phpt:1.1.2.5 Fri Dec 19 02:13:41 2008 +++ php-src/ext/json/tests/001.phpt Fri Jan 23 20:23:25 2009 @@ -24,8 +24,8 @@ var_dump(json_decode('{ "": { "": "" }')); var_dump(json_decode('{ "": "": "" } }')); -echo "Done\n"; ?> +===DONE=== --EXPECTF-- Warning: json_decode() expects at least 1 parameter, 0 given in %s on line %d NULL @@ -40,34 +40,34 @@ string(4) "blah" NULL NULL -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { ["test"]=> - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { ["foo"]=> string(3) "bar" } } -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { ["test"]=> - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { ["foo"]=> string(0) "" } } -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { ["_empty_"]=> - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { ["foo"]=> string(0) "" } } -object(stdClass)#1 (1) { +object(stdClass)#%d (1) { ["_empty_"]=> - object(stdClass)#2 (1) { + object(stdClass)#%d (1) { ["_empty_"]=> string(0) "" } } NULL NULL -Done +===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/json/tests/bug46215.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u Index: php-src/ext/json/tests/bug46215.phpt diff -u php-src/ext/json/tests/bug46215.phpt:1.1.4.2 php-src/ext/json/tests/bug46215.phpt:1.1.4.3 --- php-src/ext/json/tests/bug46215.phpt:1.1.4.2 Thu Oct 2 03:41:24 2008 +++ php-src/ext/json/tests/bug46215.phpt Fri Jan 23 20:23:25 2009 @@ -1,5 +1,11 @@ --TEST-- Bug #46215 (json_encode mutates its parameter and has some class-specific state) +--SKIPIF-- +<?php +if (!extension_loaded("json")) { + die('skip JSON extension not available in this build'); +} +?> --FILE-- <?php
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php