lithium\tests\cases\core\ErrorHandlerTest::throwException PHP Method

throwException() public method

public throwException ( )
    public function throwException()
    {
        return $this->_filter(__METHOD__, array(), function ($self, $params) {
            throw new Exception('foo');
            return 'bar';
        });
    }

Usage Example

 public function testRenderedOutput()
 {
     ob_start();
     echo 'Some Output';
     $subject = new ErrorHandlerTest();
     ErrorHandler::apply(array($subject, 'throwException'), array(), function ($details) {
     });
     $subject->throwException();
     $this->assertFalse(ob_get_length());
 }
All Usage Examples Of lithium\tests\cases\core\ErrorHandlerTest::throwException