Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 753-762 (lines=10) @@
750
    /**
751
     * @group DBAL-2508
752
     */
753
    public function testKeepsIndexOptionsOnRenamingRegularIndex()
754
    {
755
        $table = new Table('foo');
756
        $table->addColumn('id', 'integer');
757
        $table->addIndex(array('id'), 'idx_bar', array(), array('where' => '1 = 1'));
758
759
        $table->renameIndex('idx_bar', 'idx_baz');
760
761
        self::assertSame(array('where' => '1 = 1'), $table->getIndex('idx_baz')->getOptions());
762
    }
763
764
    /**
765
     * @group DBAL-2508
@@ 767-776 (lines=10) @@
764
    /**
765
     * @group DBAL-2508
766
     */
767
    public function testKeepsIndexOptionsOnRenamingUniqueIndex()
768
    {
769
        $table = new Table('foo');
770
        $table->addColumn('id', 'integer');
771
        $table->addUniqueIndex(array('id'), 'idx_bar', array('where' => '1 = 1'));
772
773
        $table->renameIndex('idx_bar', 'idx_baz');
774
775
        self::assertSame(array('where' => '1 = 1'), $table->getIndex('idx_baz')->getOptions());
776
    }
777
778
    /**
779
     * @group DBAL-234