Code Duplication    Length = 15-16 lines in 3 locations

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

@@ 896-911 (lines=16) @@
893
    /**
894
     * @group DBAL-204
895
     */
896
    public function testFqnSchemaComparison()
897
    {
898
        $config = new SchemaConfig();
899
        $config->setName("foo");
900
901
        $oldSchema = new Schema(array(), array(), $config);
902
        $oldSchema->createTable('bar');
903
904
        $newSchema = new Schema(array(), array(), $config);
905
        $newSchema->createTable('foo.bar');
906
907
        $expected             = new SchemaDiff();
908
        $expected->fromSchema = $oldSchema;
909
910
        self::assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema));
911
    }
912
913
    /**
914
     * @group DBAL-669
@@ 943-958 (lines=16) @@
940
    /**
941
     * @group DBAL-204
942
     */
943
    public function testFqnSchemaComparisonDifferentSchemaNameButSameTableNoDiff()
944
    {
945
        $config = new SchemaConfig();
946
        $config->setName("foo");
947
948
        $oldSchema = new Schema(array(), array(), $config);
949
        $oldSchema->createTable('foo.bar');
950
951
        $newSchema = new Schema();
952
        $newSchema->createTable('bar');
953
954
        $expected             = new SchemaDiff();
955
        $expected->fromSchema = $oldSchema;
956
957
        self::assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema));
958
    }
959
960
    /**
961
     * @group DBAL-204
@@ 963-977 (lines=15) @@
960
    /**
961
     * @group DBAL-204
962
     */
963
    public function testFqnSchemaComparisonNoSchemaSame()
964
    {
965
        $config = new SchemaConfig();
966
        $config->setName("foo");
967
        $oldSchema = new Schema(array(), array(), $config);
968
        $oldSchema->createTable('bar');
969
970
        $newSchema = new Schema();
971
        $newSchema->createTable('bar');
972
973
        $expected             = new SchemaDiff();
974
        $expected->fromSchema = $oldSchema;
975
976
        self::assertEquals($expected, Comparator::compareSchemas($oldSchema, $newSchema));
977
    }
978
979
    /**
980
     * @group DDC-1657