Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 1263-1269 (lines=7) @@
1260
     * @expectedException        \Doctrine\ORM\Mapping\MappingException
1261
     * @expectedExceptionMessage Entity Listener "\InvalidClassName" declared on "Doctrine\Tests\Models\CMS\CmsUser" not found.
1262
     */
1263
    public function testInvalidEntityListenerClassException()
1264
    {
1265
        $cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext);
1266
        $cm->setTable(new Mapping\TableMetadata('cms_users'));
1267
1268
        $cm->addEntityListener(Events::postLoad, '\InvalidClassName', 'postLoadHandler');
1269
    }
1270
1271
    /**
1272
     * @group DDC-1955
@@ 1277-1283 (lines=7) @@
1274
     * @expectedException        \Doctrine\ORM\Mapping\MappingException
1275
     * @expectedExceptionMessage Entity Listener "Doctrine\Tests\Models\Company\CompanyContractListener" declared on "Doctrine\Tests\Models\CMS\CmsUser" has no method "invalidMethod".
1276
     */
1277
    public function testInvalidEntityListenerMethodException()
1278
    {
1279
        $cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext);
1280
        $cm->setTable(new Mapping\TableMetadata('cms_users'));
1281
1282
        $cm->addEntityListener(Events::postLoad, 'Doctrine\Tests\Models\Company\CompanyContractListener', 'invalidMethod');
1283
    }
1284
1285
    public function testManyToManySelfReferencingNamingStrategyDefaults()
1286
    {