Unverified Commit a48c676d authored by Marius Meissner's avatar Marius Meissner Committed by Marco Pivetta

DBAL-#1234: Replaced shorthand array syntax by conventional syntax for backwards compatibility

parent 1e8270a3
...@@ -241,18 +241,18 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase ...@@ -241,18 +241,18 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase
{ {
$table = new Table('list_table_indexes_pk_id_test'); $table = new Table('list_table_indexes_pk_id_test');
$table->setSchemaConfig($this->_sm->createSchemaConfig()); $table->setSchemaConfig($this->_sm->createSchemaConfig());
$table->addColumn('id', 'integer', ['notnull' => true]); $table->addColumn('id', 'integer', array('notnull' => true));
$table->addUniqueIndex(['id'], 'id_unique_index'); $table->addUniqueIndex(array('id'), 'id_unique_index');
$this->_sm->dropAndCreateTable($table); $this->_sm->dropAndCreateTable($table);
// Adding a primary key on already indexed columns // Adding a primary key on already indexed columns
// Oracle will reuse the unique index, which cause a constraint name differing from the index name // Oracle will reuse the unique index, which cause a constraint name differing from the index name
$this->_sm->createConstraint(new Schema\Index('id_pk_id_index', ['id'], true, true), 'list_table_indexes_pk_id_test'); $this->_sm->createConstraint(new Schema\Index('id_pk_id_index', array('id'), true, true), 'list_table_indexes_pk_id_test');
$tableIndexes = $this->_sm->listTableIndexes('list_table_indexes_pk_id_test'); $tableIndexes = $this->_sm->listTableIndexes('list_table_indexes_pk_id_test');
$this->assertArrayHasKey('primary', $tableIndexes, 'listTableIndexes() has to return a "primary" array key.'); $this->assertArrayHasKey('primary', $tableIndexes, 'listTableIndexes() has to return a "primary" array key.');
$this->assertEquals(['id'], array_map('strtolower', $tableIndexes['primary']->getColumns())); $this->assertEquals(array('id'), array_map('strtolower', $tableIndexes['primary']->getColumns()));
$this->assertTrue($tableIndexes['primary']->isUnique()); $this->assertTrue($tableIndexes['primary']->isUnique());
$this->assertTrue($tableIndexes['primary']->isPrimary()); $this->assertTrue($tableIndexes['primary']->isPrimary());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment