| @@ 916-931 (lines=16) @@ | ||
| 913 | /** |
|
| 914 | * @group DBAL-234 |
|
| 915 | */ |
|
| 916 | public function testQuotesAlterTableRenameIndex() |
|
| 917 | { |
|
| 918 | $tableDiff = new TableDiff('table'); |
|
| 919 | $tableDiff->fromTable = new Table('table'); |
|
| 920 | $tableDiff->fromTable->addColumn('id', 'integer'); |
|
| 921 | $tableDiff->fromTable->setPrimaryKey(array('id')); |
|
| 922 | $tableDiff->renamedIndexes = array( |
|
| 923 | 'create' => new Index('select', array('id')), |
|
| 924 | '`foo`' => new Index('`bar`', array('id')), |
|
| 925 | ); |
|
| 926 | ||
| 927 | self::assertSame( |
|
| 928 | $this->getQuotedAlterTableRenameIndexSQL(), |
|
| 929 | $this->_platform->getAlterTableSQL($tableDiff) |
|
| 930 | ); |
|
| 931 | } |
|
| 932 | ||
| 933 | /** |
|
| 934 | * @group DBAL-234 |
|
| @@ 1071-1086 (lines=16) @@ | ||
| 1068 | /** |
|
| 1069 | * @group DBAL-807 |
|
| 1070 | */ |
|
| 1071 | public function testQuotesAlterTableRenameIndexInSchema() |
|
| 1072 | { |
|
| 1073 | $tableDiff = new TableDiff('`schema`.table'); |
|
| 1074 | $tableDiff->fromTable = new Table('`schema`.table'); |
|
| 1075 | $tableDiff->fromTable->addColumn('id', 'integer'); |
|
| 1076 | $tableDiff->fromTable->setPrimaryKey(array('id')); |
|
| 1077 | $tableDiff->renamedIndexes = array( |
|
| 1078 | 'create' => new Index('select', array('id')), |
|
| 1079 | '`foo`' => new Index('`bar`', array('id')), |
|
| 1080 | ); |
|
| 1081 | ||
| 1082 | self::assertSame( |
|
| 1083 | $this->getQuotedAlterTableRenameIndexInSchemaSQL(), |
|
| 1084 | $this->_platform->getAlterTableSQL($tableDiff) |
|
| 1085 | ); |
|
| 1086 | } |
|
| 1087 | ||
| 1088 | /** |
|
| 1089 | * @group DBAL-234 |
|