From 9acebf6f4ae2dd0a4d04541f26eb54f170e4fe78 Mon Sep 17 00:00:00 2001 From: andy wharmby Date: Sun, 1 Feb 2009 19:29:34 +0000 Subject: [PATCH] New set_magic_quotes() tests. Tested on Windows, Linux and linux 64 --- .../set_magic_quotes_runtime_basic.phpt | 52 ++++++ .../set_magic_quotes_runtime_error.phpt | 29 ++++ .../set_magic_quotes_runtime_variation1.phpt | 156 ++++++++++++++++++ 3 files changed, 237 insertions(+) create mode 100644 ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt create mode 100644 ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt create mode 100644 ext/standard/tests/general_functions/set_magic_quotes_runtime_variation1.phpt diff --git a/ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt b/ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt new file mode 100644 index 0000000000..7101f428c2 --- /dev/null +++ b/ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt @@ -0,0 +1,52 @@ +--TEST-- +Test set_magic_quotes_runtime() function - basic test +--INI- +magic_quotes_runtime = 0 +--FILE-- + +===DONE=== +--EXPECT-- +Simple testcase for set_magic_quotes_runtime() function - basic test + +-- magic quotes runtime set in INI file: 0-- + +-- Set magic quotes runtime to 1: -- +bool(true) + +-- magic quotes runtime after set: 1 -- + +-- Set magic quotes runtime to 0: -- +bool(true) + +-- magic quotes runtime after set: 0 -- + +-- Set magic quotes runtime to 1: -- +bool(true) + +-- magic quotes runtime after set: 1 -- +===DONE=== diff --git a/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt b/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt new file mode 100644 index 0000000000..a2d71fa7da --- /dev/null +++ b/ext/standard/tests/general_functions/set_magic_quotes_runtime_error.phpt @@ -0,0 +1,29 @@ +--TEST-- +Test set_magic_quotes_runtime() function - error conditions - pass function incorrect arguments +--FILE-- + +===DONE=== +--EXPECT-- +Simple testcase for set_magic_quotes_runtime() - error test + +-- Testing is_callable() function with less than expected no. of arguments -- +bool(false) + +-- Testing is_callable() function with more than expected no. of arguments -- +bool(false) +===DONE=== \ No newline at end of file diff --git a/ext/standard/tests/general_functions/set_magic_quotes_runtime_variation1.phpt b/ext/standard/tests/general_functions/set_magic_quotes_runtime_variation1.phpt new file mode 100644 index 0000000000..425a8dd565 --- /dev/null +++ b/ext/standard/tests/general_functions/set_magic_quotes_runtime_variation1.phpt @@ -0,0 +1,156 @@ +--TEST-- +Test set_magic_quotes_runtime() function - usage variation +--INI- +magic_quotes_runtime = 0 +--FILE-- + +===DONE=== +--EXPECT-- +Simple testcase for set_magic_quotes_runtime() function +magic quotes runtime set in INI file: 0 +-- Iterator 1 -- +bool(true) +New value of magic_quotes_runtime after last set is 0 +-- Iterator 2 -- +bool(true) +New value of magic_quotes_runtime after last set is 1 +-- Iterator 3 -- +bool(true) +New value of magic_quotes_runtime after last set is 1 +-- Iterator 4 -- +bool(true) +New value of magic_quotes_runtime after last set is 1 +-- Iterator 5 -- +bool(true) +New value of magic_quotes_runtime after last set is 0 +-- Iterator 6 -- +bool(true) +New value of magic_quotes_runtime after last set is 1 +-- Iterator 7 -- +bool(true) +New value of magic_quotes_runtime after last set is 1 +-- Iterator 8 -- +bool(true) +New value of magic_quotes_runtime after last set is 1 +-- Iterator 9 -- +bool(true) +New value of magic_quotes_runtime after last set is 1 +-- Iterator 10 -- +bool(true) +New value of magic_quotes_runtime after last set is 1 +-- Iterator 11 -- +bool(true) +New value of magic_quotes_runtime after last set is 0 +-- Iterator 12 -- +bool(true) +New value of magic_quotes_runtime after last set is 0 +-- Iterator 13 -- +bool(true) +New value of magic_quotes_runtime after last set is 1 +-- Iterator 14 -- +bool(true) +New value of magic_quotes_runtime after last set is 0 +-- Iterator 15 -- +bool(true) +New value of magic_quotes_runtime after last set is 1 +-- Iterator 16 -- +bool(true) +New value of magic_quotes_runtime after last set is 0 +-- Iterator 17 -- +bool(true) +New value of magic_quotes_runtime after last set is 0 +-- Iterator 18 -- +bool(true) +New value of magic_quotes_runtime after last set is 0 +-- Iterator 19 -- +bool(true) +New value of magic_quotes_runtime after last set is 1 +-- Iterator 20 -- +bool(true) +New value of magic_quotes_runtime after last set is 1 +-- Iterator 21 -- +bool(true) +New value of magic_quotes_runtime after last set is 0 +-- Iterator 22 -- +bool(true) +New value of magic_quotes_runtime after last set is 0 +===DONE=== \ No newline at end of file -- 2.50.1