Skip to content

Commit 32a1ebb

Browse files
committed
Clean up calls to extension_loaded('json') in tests
These are no longer needed after https://wiki.php.net/rfc/always_enable_json Closes GH-5637
1 parent 784f1b5 commit 32a1ebb

File tree

85 files changed

+8
-194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+8
-194
lines changed

Zend/tests/type_declarations/union_types/type_checking_strict.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
--TEST--
22
Behavior of union type checks (strict)
3-
--SKIPIF--
4-
<?php
5-
if (!extension_loaded('json')) die('skip requires json');
6-
?>
73
--FILE--
84
<?php
95

Zend/tests/type_declarations/union_types/type_checking_weak.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
--TEST--
22
Behavior of union type checks (weak)
3-
--SKIPIF--
4-
<?php
5-
if (!extension_loaded('json')) die('skip requires json');
6-
?>
73
--FILE--
84
<?php
95

ext/json/tests/001.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
json_decode() tests
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/002.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
json_encode() tests
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/003.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
json_encode() & endless loop - 1
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/004.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
json_encode() & endless loop - 2
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/005.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
json_encode() & endless loop - 3
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/006.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
json_encode() & extended encoding
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
$a = array('<foo>', "'bar'", '"baz"', '&blong&');

ext/json/tests/007.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
json_last_error() tests
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
var_dump(json_decode("[1]"));

ext/json/tests/008.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
json_decode() with large integers
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
$json = '{"largenum":123456789012345678901234567890}';

ext/json/tests/009.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
json_encode() with non-packed array that should be encoded as an array rather than object
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
$a = array(1, 2, 3, 'foo' => 'bar');

ext/json/tests/bug40503.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
Bug #40503 (json_encode() value corruption on 32bit systems with overflown values)
33
--INI--
44
serialize_precision=-1
5-
--SKIPIF--
6-
<?php if (!extension_loaded("json")) print "skip"; ?>
75
--FILE--
86
<?php
97
function json_test_show_eq($x, $y) {

ext/json/tests/bug41034.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #41034 (json_encode() ignores null byte started keys in arrays)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
echo json_encode(array(0, "\0ab"=>1, "\0null-prefixed value"));

ext/json/tests/bug41067.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #41067 (json_encode() problem with UTF-16 input)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
$single_barline = "\360\235\204\200";

ext/json/tests/bug41403.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Bug #41403 (json_decode cannot decode floats if localeconv decimal_point is not '.')
33
--SKIPIF--
44
<?php
5-
if (!extension_loaded('json')) die('skip');
65
if (setlocale(LC_NUMERIC, "de_DE") === false) {
76
die("skip no de_DE locale");
87
}

ext/json/tests/bug41504.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #41504 (json_decode() converts empty array keys to "_empty_")
3-
--SKIPIF--
4-
<?php if (!extension_loaded('json')) print 'skip'; ?>
53
--FILE--
64
<?php
75

ext/json/tests/bug41567.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
Bug #41567 (json_encode() double conversion is inconsistent with PHP)
33
--INI--
44
serialize_precision=-1
5-
--SKIPIF--
6-
<?php if (!extension_loaded('json')) print 'skip'; ?>
75
--FILE--
86
<?php
97

ext/json/tests/bug42090.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #42090 (json_decode causes segmentation fault)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
var_dump(

ext/json/tests/bug42785.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Bug #42785 (Incorrect formatting of double values with non-english locales)
44
serialize_precision=-1
55
--SKIPIF--
66
<?php
7-
if (!extension_loaded('json')) die('skip');
87
if (!setlocale(LC_CTYPE, "de_DE", "de", "german", "ge", "de_DE.ISO8859-1", "ISO8859-1")) {
98
die("skip locale needed for this test is not supported on this platform");
109
}

ext/json/tests/bug43941.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #43941 (json_encode() invalid UTF-8)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/bug45791.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #45791 (json_decode() does not handle number 0e0)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/bug46215.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #46215 (json_encode mutates its parameter and has some class-specific state)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/bug46944.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #46944 (json_encode() doesn't handle 3 byte utf8 correctly)
3-
--SKIPIF--
4-
<?php if (!extension_loaded('json')) print 'skip'; ?>
53
--FILE--
64
<?php
75

ext/json/tests/bug47644.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Bug #47644 (valid large integers are truncated)
33
--SKIPIF--
44
<?php
5-
if (!extension_loaded('json')) die('skip');
65
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
76
?>
87
--FILE--

ext/json/tests/bug50224.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
bug #50224 (json_encode() does not always encode a float as a float)
33
--INI--
44
serialize_precision=-1
5-
--SKIPIF--
6-
<?php if (!extension_loaded("json")) print "skip"; ?>
75
--FILE--
86
<?php
97
echo "* Testing JSON output\n\n";

ext/json/tests/bug53946.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
bug #53946 (json_encode() with JSON_UNESCAPED_UNICODE)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
var_dump(json_encode("latin 1234 -/ russian мама мыла раму specialchars \x02 \x08 \n U+1D11E >𝄞<"));

ext/json/tests/bug54058.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #54058 (json_last_error() invalid UTF-8 produces wrong error)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/bug54484.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #54484 (Empty string in json_decode doesn't reset json_last_error)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
json_decode('{"test":"test"}');

ext/json/tests/bug55543.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #55543 (json_encode() with JSON_NUMERIC_CHECK & numeric string properties)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
$a = new stdClass;

ext/json/tests/bug61537.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #61537 (json_encode() incorrectly truncates/discards information)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
$invalid_utf8 = "\x9f";

ext/json/tests/bug61978.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #61978 (Object recursion not detected for classes that implement JsonSerializable)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/bug62010.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #62010 (json_decode produces invalid byte-sequences)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/bug62369.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
FR #62369 (Segfault on json_encode(deeply_nested_array)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/bug63737.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #63737 (json_decode does not properly decode with options parameter)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
function decode($json) {

ext/json/tests/bug64695.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #64695 JSON_NUMERIC_CHECK has issues with strings that are numbers plus the letter e
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
$t = array('test' => '123343e871700');

ext/json/tests/bug64874_part1.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Whitespace part of bug #64874 ("json_decode handles whitespace and case-sensitivity incorrectly")
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
function decode($json) {

ext/json/tests/bug64874_part2.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Case-sensitivity part of bug #64874 ("json_decode handles whitespace and case-sensitivity incorrectly")
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
function decode($json) {

ext/json/tests/bug66021.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #66021 (Blank line inside empty array/object when JSON_PRETTY_PRINT is set)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/bug66025.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
--TEST--
22
Bug #66025 (Indent wrong when json_encode() called from jsonSerialize function)
3-
--SKIPIF--
4-
<?php
5-
if (!extension_loaded('json')) die('skip');
6-
?>
73
--FILE--
84
<?php
95

ext/json/tests/bug68546.phpt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
--TEST--
22
Bug #68546 (json_decode() Fatal error: Cannot access property started with '\0')
3-
--SKIPIF--
4-
<?php
5-
6-
if (!extension_loaded('json')) die('skip');
7-
?>
83
--FILE--
94
<?php
105

ext/json/tests/bug68567.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #68567 JSON_PARTIAL_OUTPUT_ON_ERROR can result in JSON with null key
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/bug68817.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #68817 (Null pointer deference)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/bug68938.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #68938 (json_decode() decodes empty string without indicating error)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
json_decode("");

ext/json/tests/bug68992.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
--TEST--
22
Bug #68992 (json_encode stacks exceptions thrown by JsonSerializable classes)
3-
--SKIPIF--
4-
<?php
5-
if (!extension_loaded('json')) die('skip');
6-
?>
73
--FILE--
84
<?php
95

ext/json/tests/bug69187.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #69187 json_last_error return BC in PHP7
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
var_dump(json_decode(NULL));

ext/json/tests/bug71835.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #71835 (json_encode sometimes incorrectly detects recursion with JsonSerializable)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75
class SomeClass implements JsonSerializable {

ext/json/tests/bug72069.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--TEST--
22
Bug #72069 (Behavior \JsonSerializable different from json_encode)
3-
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
53
--FILE--
64
<?php
75

ext/json/tests/bug72787.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
--TEST--
22
Bug #72787 (json_decode reads out of bounds)
33
--SKIPIF--
4-
<?php if (!extension_loaded("json")) print "skip"; ?>
54
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
65
--FILE--
76
<?php

0 commit comments

Comments
 (0)