Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 1392-1398 (lines=7) @@
1389
     * @expectedException        \Doctrine\ORM\Mapping\MappingException
1390
     * @expectedExceptionMessage Entity Listener "\InvalidClassName" declared on "Doctrine\Tests\Models\CMS\CmsUser" not found.
1391
     */
1392
    public function testInvalidEntityListenerClassException()
1393
    {
1394
        $cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext);
1395
        $cm->setTable(new Mapping\TableMetadata('cms_users'));
1396
1397
        $cm->addEntityListener(Events::postLoad, '\InvalidClassName', 'postLoadHandler');
1398
    }
1399
1400
    /**
1401
     * @group DDC-1955
@@ 1406-1412 (lines=7) @@
1403
     * @expectedException        \Doctrine\ORM\Mapping\MappingException
1404
     * @expectedExceptionMessage Entity Listener "Doctrine\Tests\Models\Company\CompanyContractListener" declared on "Doctrine\Tests\Models\CMS\CmsUser" has no method "invalidMethod".
1405
     */
1406
    public function testInvalidEntityListenerMethodException()
1407
    {
1408
        $cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext);
1409
        $cm->setTable(new Mapping\TableMetadata('cms_users'));
1410
1411
        $cm->addEntityListener(Events::postLoad, 'Doctrine\Tests\Models\Company\CompanyContractListener', 'invalidMethod');
1412
    }
1413
1414
    public function testManyToManySelfReferencingNamingStrategyDefaults()
1415
    {