| @@ 878-893 (lines=16) @@ | ||
| 875 | /** |
|
| 876 | * @group DBAL-234 |
|
| 877 | */ |
|
| 878 | public function testQuotesAlterTableRenameIndex() |
|
| 879 | { |
|
| 880 | $tableDiff = new TableDiff('table'); |
|
| 881 | $tableDiff->fromTable = new Table('table'); |
|
| 882 | $tableDiff->fromTable->addColumn('id', 'integer'); |
|
| 883 | $tableDiff->fromTable->setPrimaryKey(array('id')); |
|
| 884 | $tableDiff->renamedIndexes = array( |
|
| 885 | 'create' => new Index('select', array('id')), |
|
| 886 | '`foo`' => new Index('`bar`', array('id')), |
|
| 887 | ); |
|
| 888 | ||
| 889 | self::assertSame( |
|
| 890 | $this->getQuotedAlterTableRenameIndexSQL(), |
|
| 891 | $this->_platform->getAlterTableSQL($tableDiff) |
|
| 892 | ); |
|
| 893 | } |
|
| 894 | ||
| 895 | /** |
|
| 896 | * @group DBAL-234 |
|
| @@ 1033-1048 (lines=16) @@ | ||
| 1030 | /** |
|
| 1031 | * @group DBAL-807 |
|
| 1032 | */ |
|
| 1033 | public function testQuotesAlterTableRenameIndexInSchema() |
|
| 1034 | { |
|
| 1035 | $tableDiff = new TableDiff('`schema`.table'); |
|
| 1036 | $tableDiff->fromTable = new Table('`schema`.table'); |
|
| 1037 | $tableDiff->fromTable->addColumn('id', 'integer'); |
|
| 1038 | $tableDiff->fromTable->setPrimaryKey(array('id')); |
|
| 1039 | $tableDiff->renamedIndexes = array( |
|
| 1040 | 'create' => new Index('select', array('id')), |
|
| 1041 | '`foo`' => new Index('`bar`', array('id')), |
|
| 1042 | ); |
|
| 1043 | ||
| 1044 | self::assertSame( |
|
| 1045 | $this->getQuotedAlterTableRenameIndexInSchemaSQL(), |
|
| 1046 | $this->_platform->getAlterTableSQL($tableDiff) |
|
| 1047 | ); |
|
| 1048 | } |
|
| 1049 | ||
| 1050 | /** |
|
| 1051 | * @group DBAL-234 |
|