Code Duplication    Length = 18-18 lines in 2 locations

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

@@ 525-542 (lines=18) @@
522
        self::assertSame($seq, $diffSchema->newSequences[0]);
523
    }
524
525
    public function testTableAddForeignKey()
526
    {
527
        $tableForeign = new Table("bar");
528
        $tableForeign->addColumn('id', 'integer');
529
530
        $table1 = new Table("foo");
531
        $table1->addColumn('fk', 'integer');
532
533
        $table2 = new Table("foo");
534
        $table2->addColumn('fk', 'integer');
535
        $table2->addForeignKeyConstraint($tableForeign, array('fk'), array('id'));
536
537
        $c         = new Comparator();
538
        $tableDiff = $c->diffTable($table1, $table2);
539
540
        self::assertInstanceOf('Doctrine\DBAL\Schema\TableDiff', $tableDiff);
541
        self::assertEquals(1, count($tableDiff->addedForeignKeys));
542
    }
543
544
    public function testTableRemoveForeignKey()
545
    {
@@ 544-561 (lines=18) @@
541
        self::assertEquals(1, count($tableDiff->addedForeignKeys));
542
    }
543
544
    public function testTableRemoveForeignKey()
545
    {
546
        $tableForeign = new Table("bar");
547
        $tableForeign->addColumn('id', 'integer');
548
549
        $table1 = new Table("foo");
550
        $table1->addColumn('fk', 'integer');
551
552
        $table2 = new Table("foo");
553
        $table2->addColumn('fk', 'integer');
554
        $table2->addForeignKeyConstraint($tableForeign, array('fk'), array('id'));
555
556
        $c         = new Comparator();
557
        $tableDiff = $c->diffTable($table2, $table1);
558
559
        self::assertInstanceOf('Doctrine\DBAL\Schema\TableDiff', $tableDiff);
560
        self::assertEquals(1, count($tableDiff->removedForeignKeys));
561
    }
562
563
    public function testTableUpdateForeignKey()
564
    {