コード例 #1
0
ファイル: ExceptionTest.php プロジェクト: pscheit/psc-cms
 public function testHandlerPrintsTextAndDelegatesToErrorHandler()
 {
     $handlerMock = $this->getMock('Psc\\Code\\ErrorHandler', array('handleCaughtException'));
     $handlerMock->expects($this->once())->method('handleCaughtException')->will($this->returnSelf());
     PSC::getEnvironment()->setErrorHandler($handlerMock);
     $this->expectOutputRegex('/does not matter/');
     Exception::handler(new Exception('does not matter'));
 }