Skip to content
Snippets Groups Projects
Commit e4f06896 authored by Vincent Petry's avatar Vincent Petry
Browse files

Added test for reserved keywords

parent b752aff5
No related branches found
No related tags found
No related merge requests found
......@@ -138,4 +138,26 @@ class Migrator extends \PHPUnit_Framework_TestCase {
$this->assertTrue(true);
}
public function testReservedKeywords() {
$startSchema = new Schema(array(), array(), $this->getSchemaConfig());
$table = $startSchema->createTable($this->tableName);
$table->addColumn('id', 'integer', array('autoincrement' => true));
$table->addColumn('user', 'string', array('length' => 255));
$table->setPrimaryKey(array('id'));
$endSchema = new Schema(array(), array(), $this->getSchemaConfig());
$table = $endSchema->createTable($this->tableName);
$table->addColumn('id', 'integer', array('autoincrement' => true));
$table->addColumn('user', 'string', array('length' => 64));
$table->setPrimaryKey(array('id'));
$migrator = $this->manager->getMigrator();
$migrator->migrate($startSchema);
$migrator->checkMigrate($endSchema);
$migrator->migrate($endSchema);
$this->assertTrue(true);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment