From 180cc9d9c4d89a9ae8f4ac8ddf52205fa1817b20 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Sat, 5 May 2007 21:43:41 +0000 Subject: [PATCH] fix tests, add more --- Zend/tests/compare_001.phpt | 2 ++ Zend/tests/compare_002.phpt | 2 ++ Zend/tests/compare_003.phpt | 2 ++ Zend/tests/compare_004.phpt | 2 ++ Zend/tests/compare_005.phpt | 2 ++ Zend/tests/compare_006.phpt | 2 ++ Zend/tests/decrement_001.phpt | 2 ++ Zend/tests/exception_handler_001.phpt | 22 ++++++++++++++++++++++ Zend/tests/exception_handler_002.phpt | 27 +++++++++++++++++++++++++++ Zend/tests/exception_handler_003.phpt | 26 ++++++++++++++++++++++++++ Zend/tests/exception_handler_004.phpt | 21 +++++++++++++++++++++ Zend/tests/exception_handler_005.phpt | 25 +++++++++++++++++++++++++ Zend/tests/exception_handler_006.phpt | 27 +++++++++++++++++++++++++++ 13 files changed, 162 insertions(+) create mode 100644 Zend/tests/exception_handler_001.phpt create mode 100644 Zend/tests/exception_handler_002.phpt create mode 100644 Zend/tests/exception_handler_003.phpt create mode 100644 Zend/tests/exception_handler_004.phpt create mode 100644 Zend/tests/exception_handler_005.phpt create mode 100644 Zend/tests/exception_handler_006.phpt diff --git a/Zend/tests/compare_001.phpt b/Zend/tests/compare_001.phpt index 1ab64f0a10..059ed4a465 100644 --- a/Zend/tests/compare_001.phpt +++ b/Zend/tests/compare_001.phpt @@ -1,5 +1,7 @@ --TEST-- comparing different variables for equality +--SKIPIF-- + --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- +--EXPECTF-- +string(12) "test thrown!" +--UEXPECTF-- +unicode(12) "test thrown!" diff --git a/Zend/tests/exception_handler_002.phpt b/Zend/tests/exception_handler_002.phpt new file mode 100644 index 0000000000..6003efec47 --- /dev/null +++ b/Zend/tests/exception_handler_002.phpt @@ -0,0 +1,27 @@ +--TEST-- +exception handler tests - 2 +--FILE-- + +--EXPECTF-- +string(12) "test thrown!" + +Fatal error: Exception thrown without a stack frame in Unknown on line 0 +--UEXPECTF-- +unicode(12) "test thrown!" + +Fatal error: Exception thrown without a stack frame in Unknown on line 0 diff --git a/Zend/tests/exception_handler_003.phpt b/Zend/tests/exception_handler_003.phpt new file mode 100644 index 0000000000..b980b9c894 --- /dev/null +++ b/Zend/tests/exception_handler_003.phpt @@ -0,0 +1,26 @@ +--TEST-- +exception handler tests - 3 +--FILE-- +foo(); +throw new Exception(); + +echo "Done\n"; +?> +--EXPECTF-- +string(17) "Exception thrown!" +--UEXPECTF-- +unicode(17) "Exception thrown!" diff --git a/Zend/tests/exception_handler_004.phpt b/Zend/tests/exception_handler_004.phpt new file mode 100644 index 0000000000..2f367817e3 --- /dev/null +++ b/Zend/tests/exception_handler_004.phpt @@ -0,0 +1,21 @@ +--TEST-- +exception handler tests - 4 +--FILE-- + +--EXPECTF-- +Warning: set_exception_handler() expects the argument (fo) to be a valid callback in %s on line %d + +Warning: set_exception_handler() expects the argument (::) to be a valid callback in %s on line %d + +Warning: Wrong parameter count for set_exception_handler() in %s on line %d + +Warning: Wrong parameter count for set_exception_handler() in %s on line %d +Done diff --git a/Zend/tests/exception_handler_005.phpt b/Zend/tests/exception_handler_005.phpt new file mode 100644 index 0000000000..11ac0ba402 --- /dev/null +++ b/Zend/tests/exception_handler_005.phpt @@ -0,0 +1,25 @@ +--TEST-- +exception handler tests - 5 +--FILE-- + +--EXPECTF-- +string(25) "foo1(): Exception thrown!" +--UEXPECTF-- +unicode(25) "foo1(): Exception thrown!" diff --git a/Zend/tests/exception_handler_006.phpt b/Zend/tests/exception_handler_006.phpt new file mode 100644 index 0000000000..63b4eff451 --- /dev/null +++ b/Zend/tests/exception_handler_006.phpt @@ -0,0 +1,27 @@ +--TEST-- +exception handler tests - 6 +--FILE-- + +--EXPECTF-- +string(24) "foo(): Exception thrown!" +--UEXPECTF-- +unicode(24) "foo(): Exception thrown!" -- 2.50.1