]> granicus.if.org Git - php/commitdiff
Fix tests. Add missing SKIPIF. Tested on Windows, Linux and Linux 64
authorandy wharmby <wharmby@php.net>
Fri, 23 Jan 2009 20:23:29 +0000 (20:23 +0000)
committerandy wharmby <wharmby@php.net>
Fri, 23 Jan 2009 20:23:29 +0000 (20:23 +0000)
ext/json/tests/001.phpt
ext/json/tests/bug46215.phpt

index 095aedf631965773c9d1700b363ae6b669fa40a4..02d43c424390d327af3e92980f621b178fdd07f4 100644 (file)
@@ -23,8 +23,8 @@ var_dump(json_decode('{ "": { "": "" } }'));
 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
@@ -38,34 +38,34 @@ NULL
 NULL
 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===
index da3344fec04ec769718e30c5f0b8e30683342f24..0ac460cc15fde571f7c0828923ec756c2c4d44b9 100644 (file)
@@ -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