Code Duplication    Length = 10-11 lines in 2 locations

tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php 2 locations

@@ 84-94 (lines=11) @@
81
        $this->assertInstanceOf(CustomIdGenerator::class, $actual->idGenerator);
82
    }
83
84
    public function testGetMetadataFor_ThrowsExceptionOnUnknownCustomGeneratorClass()
85
    {
86
        $cm1 = $this->_createValidClassMetadata();
87
        $cm1->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_CUSTOM);
88
        $cm1->customGeneratorDefinition = ["class" => "NotExistingGenerator"];
89
        $cmf = $this->_createTestFactory();
90
        $cmf->setMetadataForClass($cm1->name, $cm1);
91
        $this->expectException(ORMException::class);
92
93
        $actual = $cmf->getMetadataFor($cm1->name);
94
    }
95
96
    public function testGetMetadataFor_ThrowsExceptionOnMissingCustomGeneratorDefinition()
97
    {
@@ 96-105 (lines=10) @@
93
        $actual = $cmf->getMetadataFor($cm1->name);
94
    }
95
96
    public function testGetMetadataFor_ThrowsExceptionOnMissingCustomGeneratorDefinition()
97
    {
98
        $cm1 = $this->_createValidClassMetadata();
99
        $cm1->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_CUSTOM);
100
        $cmf = $this->_createTestFactory();
101
        $cmf->setMetadataForClass($cm1->name, $cm1);
102
        $this->expectException(ORMException::class);
103
104
        $actual = $cmf->getMetadataFor($cm1->name);
105
    }
106
107
    public function testHasGetMetadata_NamespaceSeparatorIsNotNormalized()
108
    {