From: Antony Dovgal Date: Sat, 5 May 2007 21:43:41 +0000 (+0000) Subject: fix tests, add more X-Git-Tag: RELEASE_1_2_0~149 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=180cc9d9c4d89a9ae8f4ac8ddf52205fa1817b20;p=php fix tests, add more --- 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!"