|
@@ 1338-1344 (lines=7) @@
|
| 1335 |
|
* @expectedException \Doctrine\ORM\Mapping\MappingException |
| 1336 |
|
* @expectedExceptionMessage Entity Listener "\InvalidClassName" declared on "Doctrine\Tests\Models\CMS\CmsUser" not found. |
| 1337 |
|
*/ |
| 1338 |
|
public function testInvalidEntityListenerClassException() |
| 1339 |
|
{ |
| 1340 |
|
$cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext); |
| 1341 |
|
$cm->initializeReflection(new RuntimeReflectionService()); |
| 1342 |
|
|
| 1343 |
|
$cm->addEntityListener(Events::postLoad, '\InvalidClassName', 'postLoadHandler'); |
| 1344 |
|
} |
| 1345 |
|
|
| 1346 |
|
/** |
| 1347 |
|
* @group DDC-1955 |
|
@@ 1352-1358 (lines=7) @@
|
| 1349 |
|
* @expectedException \Doctrine\ORM\Mapping\MappingException |
| 1350 |
|
* @expectedExceptionMessage Entity Listener "Doctrine\Tests\Models\Company\CompanyContractListener" declared on "Doctrine\Tests\Models\CMS\CmsUser" has no method "invalidMethod". |
| 1351 |
|
*/ |
| 1352 |
|
public function testInvalidEntityListenerMethodException() |
| 1353 |
|
{ |
| 1354 |
|
$cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext); |
| 1355 |
|
$cm->initializeReflection(new RuntimeReflectionService()); |
| 1356 |
|
|
| 1357 |
|
$cm->addEntityListener(Events::postLoad, 'Doctrine\Tests\Models\Company\CompanyContractListener', 'invalidMethod'); |
| 1358 |
|
} |
| 1359 |
|
|
| 1360 |
|
public function testManyToManySelfReferencingNamingStrategyDefaults() |
| 1361 |
|
{ |