|
|
@ -39,6 +39,19 @@ class ErrorHandlerTest extends PHPUnit_Framework_TestCase |
|
|
|
trigger_error("test error", E_USER_ERROR); |
|
|
|
} |
|
|
|
|
|
|
|
public function testHandleAt() |
|
|
|
{ |
|
|
|
$my_eh = array('ErrorHandler', 'error_handler'); |
|
|
|
ErrorHandler::init(); |
|
|
|
set_error_handler($my_eh); |
|
|
|
$var = ''; |
|
|
|
$ok = @$var['some']; |
|
|
|
$this->assertSame('', $var); |
|
|
|
ob_start(); |
|
|
|
$this->setExpectedException('ErrorException'); |
|
|
|
$ex = $var['some']; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @TODO: ErrorHandler->wrapTrace() not used |
|
|
|
*/ |
|
|
|