Code Duplication    Length = 15-16 lines in 3 locations

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

@@ 870-885 (lines=16) @@
867
    /**
868
     * @group DBAL-204
869
     */
870
    public function testFqnSchemaComparison()
871
    {
872
        $config = new SchemaConfig();
873
        $config->setName("foo");
874
875
        $oldSchema = new Schema(array(), array(), $config);
876
        $oldSchema->createTable('bar');
877
878
        $newSchema= new Schema(array(), array(), $config);
879
        $newSchema->createTable('foo.bar');
880
881
        $expected = new SchemaDiff();
882
        $expected->fromSchema = $oldSchema;
883
884
        self::assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema));
885
    }
886
887
    /**
888
     * @group DBAL-669
@@ 917-932 (lines=16) @@
914
    /**
915
     * @group DBAL-204
916
     */
917
    public function testFqnSchemaComparisonDifferentSchemaNameButSameTableNoDiff()
918
    {
919
        $config = new SchemaConfig();
920
        $config->setName("foo");
921
922
        $oldSchema = new Schema(array(), array(), $config);
923
        $oldSchema->createTable('foo.bar');
924
925
        $newSchema = new Schema();
926
        $newSchema->createTable('bar');
927
928
        $expected = new SchemaDiff();
929
        $expected->fromSchema = $oldSchema;
930
931
        self::assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema));
932
    }
933
934
    /**
935
     * @group DBAL-204
@@ 937-951 (lines=15) @@
934
    /**
935
     * @group DBAL-204
936
     */
937
    public function testFqnSchemaComparisonNoSchemaSame()
938
    {
939
        $config = new SchemaConfig();
940
        $config->setName("foo");
941
        $oldSchema = new Schema(array(), array(), $config);
942
        $oldSchema->createTable('bar');
943
944
        $newSchema = new Schema();
945
        $newSchema->createTable('bar');
946
947
        $expected = new SchemaDiff();
948
        $expected->fromSchema = $oldSchema;
949
950
        self::assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema));
951
    }
952
953
    /**
954
     * @group DDC-1657