summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorandy wharmby <wharmby@php.net>2009-01-23 20:23:29 +0000
committerandy wharmby <wharmby@php.net>2009-01-23 20:23:29 +0000
commitb2f1d9267467d83252cb147659104b4483e3c554 (patch)
treed2f2f7b54d4e875f78a9a6ed465d249ed1adf4dc /ext
parent0610bbd12ac7e5071d64097bc71f274fe5b4d865 (diff)
downloadphp-git-b2f1d9267467d83252cb147659104b4483e3c554.tar.gz
Fix tests. Add missing SKIPIF. Tested on Windows, Linux and Linux 64
Diffstat (limited to 'ext')
-rw-r--r--ext/json/tests/001.phpt20
-rw-r--r--ext/json/tests/bug46215.phpt6
2 files changed, 16 insertions, 10 deletions
diff --git a/ext/json/tests/001.phpt b/ext/json/tests/001.phpt
index 095aedf631..02d43c4243 100644
--- a/ext/json/tests/001.phpt
+++ b/ext/json/tests/001.phpt
@@ -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===
diff --git a/ext/json/tests/bug46215.phpt b/ext/json/tests/bug46215.phpt
index da3344fec0..0ac460cc15 100644
--- a/ext/json/tests/bug46215.phpt
+++ b/ext/json/tests/bug46215.phpt
@@ -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