protected function createTable($name, $columns = array(), $constraints = array(), $schemaName = null) { $table = null === $schemaName ? new Table($name) : new Table($name, new Schema($schemaName)); foreach ($columns as $column) { $table->addColumn($column); } foreach ($constraints as $constraint) { $table->addConstraint($constraint); } $createTableCommand = new CreateTableCommand(); $createTableCommand->setConnection($this->connection)->setEventDispatcher($this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcher'))->setTable($table)->execute(); }
private function getCreateTableCommand() { $createTableCommand = new CreateTableCommand(); return $createTableCommand->setConnection($this->connection)->setEventDispatcher($this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcher')); }