| @@ 887-902 (lines=16) @@ | ||
| 884 | /** |
|
| 885 | * @group DBAL-234 |
|
| 886 | */ |
|
| 887 | public function testQuotesAlterTableRenameIndex() |
|
| 888 | { |
|
| 889 | $tableDiff = new TableDiff('table'); |
|
| 890 | $tableDiff->fromTable = new Table('table'); |
|
| 891 | $tableDiff->fromTable->addColumn('id', 'integer'); |
|
| 892 | $tableDiff->fromTable->setPrimaryKey(array('id')); |
|
| 893 | $tableDiff->renamedIndexes = array( |
|
| 894 | 'create' => new Index('select', array('id')), |
|
| 895 | '`foo`' => new Index('`bar`', array('id')), |
|
| 896 | ); |
|
| 897 | ||
| 898 | self::assertSame( |
|
| 899 | $this->getQuotedAlterTableRenameIndexSQL(), |
|
| 900 | $this->_platform->getAlterTableSQL($tableDiff) |
|
| 901 | ); |
|
| 902 | } |
|
| 903 | ||
| 904 | /** |
|
| 905 | * @group DBAL-234 |
|
| @@ 1042-1057 (lines=16) @@ | ||
| 1039 | /** |
|
| 1040 | * @group DBAL-807 |
|
| 1041 | */ |
|
| 1042 | public function testQuotesAlterTableRenameIndexInSchema() |
|
| 1043 | { |
|
| 1044 | $tableDiff = new TableDiff('`schema`.table'); |
|
| 1045 | $tableDiff->fromTable = new Table('`schema`.table'); |
|
| 1046 | $tableDiff->fromTable->addColumn('id', 'integer'); |
|
| 1047 | $tableDiff->fromTable->setPrimaryKey(array('id')); |
|
| 1048 | $tableDiff->renamedIndexes = array( |
|
| 1049 | 'create' => new Index('select', array('id')), |
|
| 1050 | '`foo`' => new Index('`bar`', array('id')), |
|
| 1051 | ); |
|
| 1052 | ||
| 1053 | self::assertSame( |
|
| 1054 | $this->getQuotedAlterTableRenameIndexInSchemaSQL(), |
|
| 1055 | $this->_platform->getAlterTableSQL($tableDiff) |
|
| 1056 | ); |
|
| 1057 | } |
|
| 1058 | ||
| 1059 | /** |
|
| 1060 | * @group DBAL-234 |
|