示例#1
0
 public function setUp()
 {
     $config = $this->getT4ConnectionConfig();
     $this->connection = new \Pdo('mysql:dbname=' . $config->dbname . ';host=' . $config->host . '', $config->user, $config->password);
     $this->connection->query('DROP TABLE comments');
     $this->connection->query('DROP TABLE __migrations');
     $migration = new mTestMigration();
     $migration->setDb($this->getT4Connection());
     $migration->up();
     CommentTestModel::setConnection($this->getT4Connection());
 }