Beispiel #1
0
 protected function initYentu($name)
 {
     $init = new \yentu\commands\Init();
     $this->setupStreams();
     $init->run(array('driver' => $GLOBALS['DRIVER'], 'host' => $GLOBALS['DB_HOST'], 'dbname' => $name, 'user' => $GLOBALS['DB_USER'], 'password' => $GLOBALS['DB_PASSWORD'], 'file' => $GLOBALS['DB_FILE']));
 }
Beispiel #2
0
 /**
  * @expectedException \yentu\exceptions\CommandException
  */
 public function testExistingDb()
 {
     $this->pdo->query('CREATE TABLE yentu_history(dummy INTEGER)');
     $initCommand = new \yentu\commands\Init();
     \yentu\Yentu::setDefaultHome(vfsStream::url("home/yentu"));
     $initCommand->run(array('driver' => $GLOBALS['DRIVER'], 'host' => $GLOBALS['DB_HOST'], 'dbname' => $GLOBALS['DB_NAME'], 'user' => $GLOBALS['DB_USER'], 'password' => $GLOBALS['DB_PASSWORD'], 'file' => $GLOBALS['DB_FILE']));
 }