function testErrorSuppressed() { #> Given $exception = NULL; ErrorControl::disableStatic(E_WARNING); #> When try { $this->generatePhpWarning(); } catch (\Exception $exception) { } #> Then $this->assertNull($exception); #> Clean up ErrorControl::restoreStatic(); }
exit(1); } } /* Defaults: */ if (!defined('VERBOSE')) { define('VERBOSE', true); } if (!defined('LOG')) { define('LOG', true); } if (!defined('DELIVER')) { define('DELIVER', false); } /* Instantiate general output and error: */ $output = new Output(); $error = new ErrorControl(); $output->say("+++ QMID DISPATCHER +++", 2); $output->say("> Started at: " . date(DATEFORMAT)); /* New dispatcher wich parses the rules: */ $dispatcher = new Dispatcher(); /* Imap: */ $imap = new imap(); $output->say("> " . $imap->count() . " messages to process."); $dispatcher->imap = $imap; /* Process the mail */ $dispatcher->processMailbox(); /* END */ unset($imap); $error->Finish(); /* * All imap work.
///}}} } unset($SysCache); //没有缓存和二级缓存 进入下面的控制器构建 $_control = ucfirst(strtolower(Q('control'))) . 'Control'; $_control_file = SYS_APP . 'control/' . $_control . '.php'; $_action = Q('action'); include SYS_LIB . 'smarty/Smarty.class.php'; include SYS_LIB . 'core/viewSys.php'; include SYS_LIB . 'core/controlSys.php'; class_alias('\\Sys\\control', 'control'); //定义模版中用到的变量 define('V_DOMAIN', 'http://' . $_SERVER['SERVER_NAME']); define('V_APP', V_DOMAIN . '/'); //资源域名在这里修改 define('V_PUBLIC', V_DOMAIN . '/public/'); //架构控制器 if (file_exists($_control_file)) { include SYS_APP . 'control/' . $_control . '.php'; $_obj = $_control::getInstance($_control); if (is_callable(array($_obj, $_action))) { $_obj->{$_action}(); } else { unset($_obj); } } if (!isset($_obj)) { include SYS_APP . 'control/ErrorControl.php'; $_obj = ErrorControl::getInstance('ErrorControl'); $_obj->Error404(); }