public function testDropAndCreateIndex()
 {
     $table = $this->getTestTable('test_create_index');
     $table->addUniqueIndex(array('test'), 'test');
     $this->_sm->dropAndCreateTable($table);
     $this->_sm->dropAndCreateIndex($table->getIndex('test'), $table);
     $tableIndexes = $this->_sm->listTableIndexes('test_create_index');
     $this->assertType('array', $tableIndexes);
     $this->assertEquals('test', strtolower($tableIndexes['test']->getName()));
     $this->assertEquals(array('test'), array_map('strtolower', $tableIndexes['test']->getColumns()));
     $this->assertTrue($tableIndexes['test']->isUnique());
     $this->assertFalse($tableIndexes['test']->isPrimary());
 }
Пример #2
0
 /**
  * {@see AbstractSchemaManager::dropAndCreateIndex}
  */
 public function dropAndCreateIndex(Index $index, $table)
 {
     $this->manager->dropAndCreateIndex($index, $this->replacePrefix($table));
 }