コード例 #1
0
ファイル: AppTest.php プロジェクト: nemphys/magento2
 public function testSetErrorHandler()
 {
     $this->_model->setErrorHandler(array($this, 'errorHandler'));
     try {
         trigger_error('test', E_USER_NOTICE);
         if (!$this->_errorCatchFlag) {
             $this->fail('Error handler is not working');
         }
         restore_error_handler();
     } catch (Exception $e) {
         restore_error_handler();
         throw $e;
     }
 }