Skip to content

Commit 3aaaf37

Browse files
committed
fix: PrePersistEventTest typos and unnecessary comments
1 parent 4fb044d commit 3aaaf37

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

tests/Tests/ORM/Functional/PrePersistEventTest.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,21 @@
1515

1616
use function uniqid;
1717

18-
/**
19-
* PrePersistEventTest
20-
*/
2118
class PrePersistEventTest extends OrmFunctionalTestCase
2219
{
2320
protected function setUp(): void
2421
{
2522
parent::setUp();
2623

2724
$this->createSchemaForModels(
28-
EntityWithUnmapEntity::class,
25+
EntityWithUnmappedEntity::class,
2926
EntityWithCascadeAssociation::class
3027
);
3128
}
3229

3330
public function testCallingPersistInPrePersistHook(): void
3431
{
35-
$entityWithUnmapped = new EntityWithUnmapEntity();
32+
$entityWithUnmapped = new EntityWithUnmappedEntity();
3633
$entityWithCascade = new EntityWithCascadeAssociation();
3734

3835
$entityWithUnmapped->unmapped = $entityWithCascade;
@@ -52,7 +49,7 @@ public function prePersist(PrePersistEventArgs $args): void
5249
{
5350
$object = $args->getObject();
5451

55-
if ($object instanceof EntityWithUnmapEntity) {
52+
if ($object instanceof EntityWithUnmappedEntity) {
5653
$uow = $args->getObjectManager()->getUnitOfWork();
5754

5855
if ($object->unmapped && ! $uow->isInIdentityMap($object->unmapped) && ! $uow->isScheduledForInsert($object->unmapped)) {
@@ -64,7 +61,7 @@ public function prePersist(PrePersistEventArgs $args): void
6461

6562
/** @Entity */
6663
#[Entity]
67-
class EntityWithUnmapEntity
64+
class EntityWithUnmappedEntity
6865
{
6966
/**
7067
* @var string
@@ -102,10 +99,10 @@ class EntityWithCascadeAssociation
10299
public $id;
103100

104101
/**
105-
* @var ?EntityWithUnmapEntity
106-
* @ManyToOne(targetEntity=EntityWithUnmapEntity::class, cascade={"persist"})
102+
* @var ?EntityWithUnmappedEntity
103+
* @ManyToOne(targetEntity=EntityWithUnmappedEntity::class, cascade={"persist"})
107104
*/
108-
#[ManyToOne(targetEntity: EntityWithUnmapEntity::class, cascade: ['persist'])]
105+
#[ManyToOne(targetEntity: EntityWithUnmappedEntity::class, cascade: ['persist'])]
109106
public $cascaded = null;
110107

111108
public function __construct()

0 commit comments

Comments
 (0)