enableBc(); $GLOBALS['cfg']['Server'] = array( 'host' => 'host', 'verbose' => 'verbose', ); $GLOBALS['cfg']['OBGzip'] = false; $_SESSION['PMA_Theme'] = new PMA_Theme(); $GLOBALS['pmaThemeImage'] = 'theme/'; $GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath(); $GLOBALS['server'] = 1; $GLOBALS['db'] = ''; $GLOBALS['table'] = ''; } /** * Test for PMA_fatalError * * @return void */ public function testFatalErrorMessage() { $this->expectOutputRegex("/FatalError!/"); PMA_fatalError("FatalError!"); } /** * Test for PMA_fatalError * * @return void */ public function testFatalErrorMessageWithArgs() { $message = "Fatal error #%d in file %s."; $params = array(1, 'error_file.php'); $this->expectOutputRegex( "/Fatal error #1 in file error_file.php./", "Not EQ" ); PMA_fatalError($message, $params); $message = "Fatal error in file %s."; $params = 'error_file.php'; $this->expectOutputRegex("/Fatal error in file error_file.php./"); PMA_fatalError($message, $params); } }