From a348a5daa41b70da5edeb7d75898a56997e44c25 Mon Sep 17 00:00:00 2001 From: Jani Taskinen Date: Tue, 22 Jul 2008 14:14:31 +0000 Subject: [PATCH] - Add missing tests (thanks for being so fucking lazy Ilia!) --- ext/json/tests/bug41504.phpt | 31 +++++++++++++++++++++++++++++++ ext/json/tests/bug41567.phpt | 15 +++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 ext/json/tests/bug41504.phpt create mode 100644 ext/json/tests/bug41567.phpt diff --git a/ext/json/tests/bug41504.phpt b/ext/json/tests/bug41504.phpt new file mode 100644 index 0000000000..bef497404f --- /dev/null +++ b/ext/json/tests/bug41504.phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #41504 (json_decode() converts empty array keys to "_empty_") +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(1) { + [""]=> + string(5) "value" +} +array(2) { + [""]=> + string(5) "value" + ["key"]=> + string(5) "value" +} +array(2) { + ["key"]=> + string(5) "value" + [""]=> + string(5) "value" +} +Done diff --git a/ext/json/tests/bug41567.phpt b/ext/json/tests/bug41567.phpt new file mode 100644 index 0000000000..5553df397c --- /dev/null +++ b/ext/json/tests/bug41567.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #41567 (json_encode() double conversion is inconsistent with PHP) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +float(123456789.12345) +Done -- 2.40.0