Code Duplication    Length = 18-18 lines in 2 locations

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

@@ 472-489 (lines=18) @@
469
        self::assertSame($seq, $diffSchema->newSequences[0]);
470
    }
471
472
    public function testTableAddForeignKey()
473
    {
474
        $tableForeign = new Table("bar");
475
        $tableForeign->addColumn('id', 'integer');
476
477
        $table1 = new Table("foo");
478
        $table1->addColumn('fk', 'integer');
479
480
        $table2 = new Table("foo");
481
        $table2->addColumn('fk', 'integer');
482
        $table2->addForeignKeyConstraint($tableForeign, array('fk'), array('id'));
483
484
        $c = new Comparator();
485
        $tableDiff = $c->diffTable($table1, $table2);
486
487
        self::assertInstanceOf('Doctrine\DBAL\Schema\TableDiff', $tableDiff);
488
        self::assertEquals(1, count($tableDiff->addedForeignKeys));
489
    }
490
491
    public function testTableRemoveForeignKey()
492
    {
@@ 491-508 (lines=18) @@
488
        self::assertEquals(1, count($tableDiff->addedForeignKeys));
489
    }
490
491
    public function testTableRemoveForeignKey()
492
    {
493
        $tableForeign = new Table("bar");
494
        $tableForeign->addColumn('id', 'integer');
495
496
        $table1 = new Table("foo");
497
        $table1->addColumn('fk', 'integer');
498
499
        $table2 = new Table("foo");
500
        $table2->addColumn('fk', 'integer');
501
        $table2->addForeignKeyConstraint($tableForeign, array('fk'), array('id'));
502
503
        $c = new Comparator();
504
        $tableDiff = $c->diffTable($table2, $table1);
505
506
        self::assertInstanceOf('Doctrine\DBAL\Schema\TableDiff', $tableDiff);
507
        self::assertEquals(1, count($tableDiff->removedForeignKeys));
508
    }
509
510
    public function testTableUpdateForeignKey()
511
    {