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()); }
/** * {@see AbstractSchemaManager::dropAndCreateIndex} */ public function dropAndCreateIndex(Index $index, $table) { $this->manager->dropAndCreateIndex($index, $this->replacePrefix($table)); }