From ff59351416756edfdeb39b134a1b172059fca83c Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Thu, 1 Jun 2006 11:57:49 +0000 Subject: [PATCH] add new tests --- Zend/tests/offset_array.phpt | 47 +++++++++++++++++++++++++++++++++++ Zend/tests/offset_bool.phpt | 37 +++++++++++++++++++++++++++ Zend/tests/offset_long.phpt | 37 +++++++++++++++++++++++++++ Zend/tests/offset_null.phpt | 37 +++++++++++++++++++++++++++ Zend/tests/offset_object.phpt | 11 ++++++++ Zend/tests/offset_string.phpt | 45 +++++++++++++++++++++++++++++++++ 6 files changed, 214 insertions(+) create mode 100644 Zend/tests/offset_array.phpt create mode 100644 Zend/tests/offset_bool.phpt create mode 100644 Zend/tests/offset_long.phpt create mode 100644 Zend/tests/offset_null.phpt create mode 100644 Zend/tests/offset_object.phpt create mode 100644 Zend/tests/offset_string.phpt diff --git a/Zend/tests/offset_array.phpt b/Zend/tests/offset_array.phpt new file mode 100644 index 0000000000..a7e2f21b1c --- /dev/null +++ b/Zend/tests/offset_array.phpt @@ -0,0 +1,47 @@ +--TEST-- +using different variables to access array offsets +--FILE-- + +--EXPECTF-- +int(2) +int(1) + +Notice: Undefined index: in %s on line %d +NULL + +Notice: Undefined index: run away in %s on line %d +NULL +int(2) +int(1) + +Strict Standards: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d +int(%d) + +Warning: Illegal offset type in %s on line %d +NULL + +Warning: Illegal offset type in %s on line %d +NULL +Done diff --git a/Zend/tests/offset_bool.phpt b/Zend/tests/offset_bool.phpt new file mode 100644 index 0000000000..9bf8a89da7 --- /dev/null +++ b/Zend/tests/offset_bool.phpt @@ -0,0 +1,37 @@ +--TEST-- +using different variables to access boolean offsets +--FILE-- + +--EXPECTF-- +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +Done diff --git a/Zend/tests/offset_long.phpt b/Zend/tests/offset_long.phpt new file mode 100644 index 0000000000..c65a5ba3f8 --- /dev/null +++ b/Zend/tests/offset_long.phpt @@ -0,0 +1,37 @@ +--TEST-- +using different variables to access long offsets +--FILE-- + +--EXPECTF-- +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +Done diff --git a/Zend/tests/offset_null.phpt b/Zend/tests/offset_null.phpt new file mode 100644 index 0000000000..9364f0a2e5 --- /dev/null +++ b/Zend/tests/offset_null.phpt @@ -0,0 +1,37 @@ +--TEST-- +using different variables to access null offsets +--FILE-- + +--EXPECTF-- +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +NULL +Done diff --git a/Zend/tests/offset_object.phpt b/Zend/tests/offset_object.phpt new file mode 100644 index 0000000000..b570fd2a2f --- /dev/null +++ b/Zend/tests/offset_object.phpt @@ -0,0 +1,11 @@ +--TEST-- +accessing object dimension +--FILE-- + +--EXPECTF-- +Fatal error: Cannot use object of type stdClass as array in %s on line %d diff --git a/Zend/tests/offset_string.phpt b/Zend/tests/offset_string.phpt new file mode 100644 index 0000000000..63d8abe8dd --- /dev/null +++ b/Zend/tests/offset_string.phpt @@ -0,0 +1,45 @@ +--TEST-- +using different variables to access string offsets +--FILE-- + +--EXPECTF-- +string(1) "i" +string(1) "S" +string(1) "S" +string(1) "S" +string(1) "i" +string(1) "S" + +Warning: Illegal offset type in %s on line %d +string(1) "%s" + +Warning: Illegal offset type in %s on line %d + +Notice: Object of class stdClass could not be converted to int in %s on line %d +string(1) "%s" + +Warning: Illegal offset type in %s on line %d +string(1) "i" +Done -- 2.40.0