Code Duplication    Length = 10-10 lines in 2 locations

tests/Doctrine/Tests/DBAL/Schema/TableTest.php 2 locations

@@ 801-810 (lines=10) @@
798
    /**
799
     * @group DBAL-2508
800
     */
801
    public function testKeepsIndexOptionsOnRenamingRegularIndex()
802
    {
803
        $table = new Table('foo');
804
        $table->addColumn('id', 'integer');
805
        $table->addIndex(array('id'), 'idx_bar', array(), array('where' => '1 = 1'));
806
807
        $table->renameIndex('idx_bar', 'idx_baz');
808
809
        $this->assertSame(array('where' => '1 = 1'), $table->getIndex('idx_baz')->getOptions());
810
    }
811
812
    /**
813
     * @group DBAL-2508
@@ 815-824 (lines=10) @@
812
    /**
813
     * @group DBAL-2508
814
     */
815
    public function testKeepsIndexOptionsOnRenamingUniqueIndex()
816
    {
817
        $table = new Table('foo');
818
        $table->addColumn('id', 'integer');
819
        $table->addUniqueIndex(array('id'), 'idx_bar', array('where' => '1 = 1'));
820
821
        $table->renameIndex('idx_bar', 'idx_baz');
822
823
        $this->assertSame(array('where' => '1 = 1'), $table->getIndex('idx_baz')->getOptions());
824
    }
825
826
    /**
827
     * @group DBAL-234