Code Duplication    Length = 15-16 lines in 3 locations

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

@@ 843-858 (lines=16) @@
840
    /**
841
     * @group DBAL-204
842
     */
843
    public function testFqnSchemaComparison()
844
    {
845
        $config = new SchemaConfig();
846
        $config->setName("foo");
847
848
        $oldSchema = new Schema(array(), array(), $config);
849
        $oldSchema->createTable('bar');
850
851
        $newSchema= new Schema(array(), array(), $config);
852
        $newSchema->createTable('foo.bar');
853
854
        $expected = new SchemaDiff();
855
        $expected->fromSchema = $oldSchema;
856
857
        self::assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema));
858
    }
859
860
    /**
861
     * @group DBAL-669
@@ 890-905 (lines=16) @@
887
    /**
888
     * @group DBAL-204
889
     */
890
    public function testFqnSchemaComparisonDifferentSchemaNameButSameTableNoDiff()
891
    {
892
        $config = new SchemaConfig();
893
        $config->setName("foo");
894
895
        $oldSchema = new Schema(array(), array(), $config);
896
        $oldSchema->createTable('foo.bar');
897
898
        $newSchema = new Schema();
899
        $newSchema->createTable('bar');
900
901
        $expected = new SchemaDiff();
902
        $expected->fromSchema = $oldSchema;
903
904
        self::assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema));
905
    }
906
907
    /**
908
     * @group DBAL-204
@@ 910-924 (lines=15) @@
907
    /**
908
     * @group DBAL-204
909
     */
910
    public function testFqnSchemaComparisonNoSchemaSame()
911
    {
912
        $config = new SchemaConfig();
913
        $config->setName("foo");
914
        $oldSchema = new Schema(array(), array(), $config);
915
        $oldSchema->createTable('bar');
916
917
        $newSchema = new Schema();
918
        $newSchema->createTable('bar');
919
920
        $expected = new SchemaDiff();
921
        $expected->fromSchema = $oldSchema;
922
923
        self::assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema));
924
    }
925
926
    /**
927
     * @group DDC-1657