Code Duplication    Length = 15-15 lines in 2 locations

tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php 2 locations

@@ 857-871 (lines=15) @@
854
    /**
855
     * @group DBAL-234
856
     */
857
    public function testAlterTableRenameIndex()
858
    {
859
        $tableDiff = new TableDiff('mytable');
860
        $tableDiff->fromTable = new Table('mytable');
861
        $tableDiff->fromTable->addColumn('id', 'integer');
862
        $tableDiff->fromTable->setPrimaryKey(array('id'));
863
        $tableDiff->renamedIndexes = array(
864
            'idx_foo' => new Index('idx_bar', array('id'))
865
        );
866
867
        self::assertSame(
868
            $this->getAlterTableRenameIndexSQL(),
869
            $this->_platform->getAlterTableSQL($tableDiff)
870
        );
871
    }
872
873
    /**
874
     * @group DBAL-234
@@ 1012-1026 (lines=15) @@
1009
    /**
1010
     * @group DBAL-807
1011
     */
1012
    public function testAlterTableRenameIndexInSchema()
1013
    {
1014
        $tableDiff = new TableDiff('myschema.mytable');
1015
        $tableDiff->fromTable = new Table('myschema.mytable');
1016
        $tableDiff->fromTable->addColumn('id', 'integer');
1017
        $tableDiff->fromTable->setPrimaryKey(array('id'));
1018
        $tableDiff->renamedIndexes = array(
1019
            'idx_foo' => new Index('idx_bar', array('id'))
1020
        );
1021
1022
        self::assertSame(
1023
            $this->getAlterTableRenameIndexInSchemaSQL(),
1024
            $this->_platform->getAlterTableSQL($tableDiff)
1025
        );
1026
    }
1027
1028
    /**
1029
     * @group DBAL-807