예제 #1
0
 public static function setUpBeforeClass()
 {
     if (getenv('APPVEYOR')) {
         self::$config['password'] = '******';
     }
     $sql = file_get_contents(\Codeception\Configuration::dataDir() . '/dumps/mysql.sql');
     $sql = preg_replace('%/\\*(?:(?!\\*/).)*\\*/%s', "", $sql);
     self::$sql = explode("\n", $sql);
     try {
         self::$mysql = Db::create(self::$config['dsn'], self::$config['user'], self::$config['password']);
         self::$mysql->cleanup();
     } catch (\Exception $e) {
     }
 }