diff options
author | Greg Beaver <cellog@php.net> | 2005-10-20 01:49:42 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2005-10-20 01:49:42 +0000 |
commit | 3446a75a36964410413bd57f756120f1868fc463 (patch) | |
tree | 6d2a96700b472f931c29b8dc5075130b1935e669 /pear/tests/pear_error3.phpt | |
parent | 5bb29235dcf14be317f07d389b5be2f2c5318950 (diff) | |
download | php-git-3446a75a36964410413bd57f756120f1868fc463.tar.gz |
remove unused obsolete files from pear CVS
# to run PEAR tests, grab pear-core/tests and use "pear run-tests -rq"
Diffstat (limited to 'pear/tests/pear_error3.phpt')
-rw-r--r-- | pear/tests/pear_error3.phpt | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/pear/tests/pear_error3.phpt b/pear/tests/pear_error3.phpt deleted file mode 100644 index 2e5ce8d2a2..0000000000 --- a/pear/tests/pear_error3.phpt +++ /dev/null @@ -1,58 +0,0 @@ ---TEST-- -PEAR_Error: default error handling ---SKIPIF-- -<?php -if (!getenv('PHP_PEAR_RUNTESTS')) { - echo 'skip'; -} -?> ---FILE-- -<?php // -*- PHP -*- - -// Test for: PEAR.php -// Parts tested: - PEAR_Error class -// - PEAR::setErrorHandling -// - PEAR::raiseError method - -include_once "PEAR.php"; - -error_reporting(E_ALL); - -function errorhandler($eobj) -{ - if (PEAR::isError($eobj)) { - print "errorhandler called with an error object.\n"; - print "error message: ".$eobj->getMessage()."\n"; - } else { - print "errorhandler called, but without an error object.\n"; - } -} - -// Test 1 -PEAR::setErrorHandling(PEAR_ERROR_PRINT, "OOPS: %s\n"); -$tmp = new PEAR; -$tmp->raiseError("error happens"); - -// Return PEAR to its original state -$GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN; -$GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE; -$GLOBALS['_PEAR_default_error_callback'] = ''; - -// Test 2 -$obj = new PEAR; -$obj->setErrorHandling(PEAR_ERROR_PRINT); -$obj->raiseError("error 1\n"); -$obj->setErrorHandling(null); -$obj->raiseError("error 2\n"); -PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, "errorhandler"); -$obj->raiseError("error 3"); -$obj->setErrorHandling(PEAR_ERROR_PRINT); -$obj->raiseError("error 4\n"); - -?> ---EXPECT-- -OOPS: error happens -error 1 -errorhandler called with an error object. -error message: error 3 -error 4
\ No newline at end of file |