diff --git a/test/config/config.php b/test/config/config.php index 9ce7b2fc18..6f0c1253de 100644 --- a/test/config/config.php +++ b/test/config/config.php @@ -43,6 +43,7 @@ $config->uitest->chrome->options[] = '--ignore-certificate-errors'; $config->uitest->chrome->options[] = '--test-type'; $config->uitest->chrome->options[] = '--start-maximized'; +$config->uitest->setExceptionHandler = true; $config->uitest->exitBrowserOnException = true; $extConfigFiles = glob(dirname(__FILE__) . DS . 'ext' . DS . '*.php'); if($extConfigFiles) foreach($extConfigFiles as $extConfigFile) include $extConfigFile; diff --git a/test/lib/ui.php b/test/lib/ui.php index 59a7f77415..f8cde9c806 100644 --- a/test/lib/ui.php +++ b/test/lib/ui.php @@ -154,13 +154,13 @@ class tester extends result $this->cookieFile = '/tmp/cookie'; // 设置异常处理函数 - set_exception_handler(array($this, 'exceptionHandler')); + if($this->config->uitest->setExceptionHandler) set_exception_handler(array($this, 'exceptionHandler')); } /** * Exception handler. * - * @param int $e + * @param object $e * @access public * @return void */