From a96827c69970a4fea3297a4b8db503b545a819bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Djupsj=C3=B6backa?= Date: Tue, 19 Dec 2023 12:04:11 +0200 Subject: [PATCH] Remove some tests specific to PHP 7 --- .../{014_php8.phpt => 014.phpt} | 2 +- .../comparison_bracket_notation/014_php7.phpt | 18 ------------------ .../{047_php8.phpt => 047.phpt} | 2 +- tests/comparison_dot_notation/047_php7.phpt | 18 ------------------ .../{002_php8.phpt => 002.phpt} | 2 +- tests/comparison_root/002_php7.phpt | 18 ------------------ .../{003_php8.phpt => 003.phpt} | 2 +- tests/comparison_root/003_php7.phpt | 18 ------------------ .../{004_php8.phpt => 004.phpt} | 2 +- tests/comparison_root/004_php7.phpt | 18 ------------------ 10 files changed, 5 insertions(+), 95 deletions(-) rename tests/comparison_bracket_notation/{014_php8.phpt => 014.phpt} (85%) delete mode 100644 tests/comparison_bracket_notation/014_php7.phpt rename tests/comparison_dot_notation/{047_php8.phpt => 047.phpt} (86%) delete mode 100644 tests/comparison_dot_notation/047_php7.phpt rename tests/comparison_root/{002_php8.phpt => 002.phpt} (84%) delete mode 100644 tests/comparison_root/002_php7.phpt rename tests/comparison_root/{003_php8.phpt => 003.phpt} (85%) delete mode 100644 tests/comparison_root/003_php7.phpt rename tests/comparison_root/{004_php8.phpt => 004.phpt} (85%) delete mode 100644 tests/comparison_root/004_php7.phpt diff --git a/tests/comparison_bracket_notation/014_php8.phpt b/tests/comparison_bracket_notation/014.phpt similarity index 85% rename from tests/comparison_bracket_notation/014_php8.phpt rename to tests/comparison_bracket_notation/014.phpt index d2ff6ea..9f2c739 100644 --- a/tests/comparison_bracket_notation/014_php8.phpt +++ b/tests/comparison_bracket_notation/014.phpt @@ -14,7 +14,7 @@ $result = $jsonPath->find($data, '$[0]'); var_dump($result); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, string given in %s014_php8.php:%d +Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, string given in %s014.php:%d Stack trace: %s %s diff --git a/tests/comparison_bracket_notation/014_php7.phpt b/tests/comparison_bracket_notation/014_php7.phpt deleted file mode 100644 index 2939e78..0000000 --- a/tests/comparison_bracket_notation/014_php7.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Test bracket notation with number on string ---SKIPIF-- - -=')) print "skip"; ?> ---FILE-- -find($data, '$[0]'); - -var_dump($result); -?> ---EXPECTF-- -Warning: JsonPath\JsonPath::find() expects parameter 1 to be array, string given in %s014_php7.php on line %d -NULL diff --git a/tests/comparison_dot_notation/047_php8.phpt b/tests/comparison_dot_notation/047.phpt similarity index 86% rename from tests/comparison_dot_notation/047_php8.phpt rename to tests/comparison_dot_notation/047.phpt index 0eba705..5c7eabd 100644 --- a/tests/comparison_dot_notation/047_php8.phpt +++ b/tests/comparison_dot_notation/047.phpt @@ -14,7 +14,7 @@ $result = $jsonPath->find($data, "$..*"); var_dump($result); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, int given in %s047_php8.php:%d +Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, int given in %s047.php:%d Stack trace: %s %s diff --git a/tests/comparison_dot_notation/047_php7.phpt b/tests/comparison_dot_notation/047_php7.phpt deleted file mode 100644 index f4f5139..0000000 --- a/tests/comparison_dot_notation/047_php7.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Test dot notation with wildcard after recursive descent on scalar ---SKIPIF-- - -=')) print "skip"; ?> ---FILE-- -find($data, "$..*"); - -var_dump($result); -?> ---EXPECTF-- -Warning: JsonPath\JsonPath::find() expects parameter 1 to be array, int given in %s047_php7.php on line %d -NULL diff --git a/tests/comparison_root/002_php8.phpt b/tests/comparison_root/002.phpt similarity index 84% rename from tests/comparison_root/002_php8.phpt rename to tests/comparison_root/002.phpt index b9355cc..1991921 100644 --- a/tests/comparison_root/002_php8.phpt +++ b/tests/comparison_root/002.phpt @@ -14,7 +14,7 @@ $result = $jsonPath->find($data, "$"); var_dump($result); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, int given in %s002_php8.php:%d +Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, int given in %s002.php:%d Stack trace: %s %s diff --git a/tests/comparison_root/002_php7.phpt b/tests/comparison_root/002_php7.phpt deleted file mode 100644 index cdf6ed3..0000000 --- a/tests/comparison_root/002_php7.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Test root on scalar ---SKIPIF-- - -=')) print "skip"; ?> ---FILE-- -find($data, "$"); - -var_dump($result); -?> ---EXPECTF-- -Warning: JsonPath\JsonPath::find() expects parameter 1 to be array, int given in %s002_php7.php on line %d -NULL diff --git a/tests/comparison_root/003_php8.phpt b/tests/comparison_root/003.phpt similarity index 85% rename from tests/comparison_root/003_php8.phpt rename to tests/comparison_root/003.phpt index 1539aac..6f2ec89 100644 --- a/tests/comparison_root/003_php8.phpt +++ b/tests/comparison_root/003.phpt @@ -14,7 +14,7 @@ $result = $jsonPath->find($data, "$"); var_dump($result); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, %s given in %s003_php8.php:%d +Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, %s given in %s003.php:%d Stack trace: %s %s diff --git a/tests/comparison_root/003_php7.phpt b/tests/comparison_root/003_php7.phpt deleted file mode 100644 index 28f0a4b..0000000 --- a/tests/comparison_root/003_php7.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Test root on scalar false ---SKIPIF-- - -=')) print "skip"; ?> ---FILE-- -find($data, "$"); - -var_dump($result); -?> ---EXPECTF-- -Warning: JsonPath\JsonPath::find() expects parameter 1 to be array, bool given in %s003_php7.php on line %d -NULL diff --git a/tests/comparison_root/004_php8.phpt b/tests/comparison_root/004.phpt similarity index 85% rename from tests/comparison_root/004_php8.phpt rename to tests/comparison_root/004.phpt index 69275b9..d0deecb 100644 --- a/tests/comparison_root/004_php8.phpt +++ b/tests/comparison_root/004.phpt @@ -14,7 +14,7 @@ $result = $jsonPath->find($data, "$"); var_dump($result); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, %s given in %s004_php8.php:%d +Fatal error: Uncaught TypeError: JsonPath\JsonPath::find(): Argument #1 ($data) must be of type array, %s given in %s004.php:%d Stack trace: %s %s diff --git a/tests/comparison_root/004_php7.phpt b/tests/comparison_root/004_php7.phpt deleted file mode 100644 index 996d955..0000000 --- a/tests/comparison_root/004_php7.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Test root on scalar true ---SKIPIF-- - -=')) print "skip"; ?> ---FILE-- -find($data, "$"); - -var_dump($result); -?> ---EXPECTF-- -Warning: JsonPath\JsonPath::find() expects parameter 1 to be array, bool given in %s004_php7.php on line %d -NULL