예제 #1
0
 /**
  * @param boolean $exit
  */
 public static function main($exit = TRUE)
 {
     $opt = PHPUnit_TextUI_Command::_get_my_cnf_options();
     $GLOBALS['mysql_host'] = isset($opt['host']) ? $opt['host'] : 'localhost';
     $GLOBALS['mysql_user'] = isset($opt['user']) ? $opt['user'] : (isset($_ENV['USER']) ? $_ENV['USER'] : null);
     $GLOBALS['mysql_pass'] = isset($opt['password']) ? $opt['password'] : null;
     if (!$GLOBALS['mysql_pass']) {
         $GLOBALS['mysql_pass'] = isset($opt['pass']) ? $opt['pass'] : null;
     }
     $GLOBALS['mysql_db'] = null;
     $command = new PHPUnit_TextUI_Command();
     return $command->run($_SERVER['argv'], $exit);
 }