diff --git a/Tests/Caster/DoctrineCasterTest.php b/Tests/Caster/DoctrineCasterTest.php index b0b0c90..06b65ff 100644 --- a/Tests/Caster/DoctrineCasterTest.php +++ b/Tests/Caster/DoctrineCasterTest.php @@ -29,7 +29,9 @@ public function testCastPersistentCollection() { $classMetadata = new ClassMetadata(__CLASS__); - $collection = new PersistentCollection($this->createMock(EntityManagerInterface::class), $classMetadata, new ArrayCollection(['test'])); + $entityManager = $this->createMock(EntityManagerInterface::class); + $entityManagerClass = $entityManager::class; + $collection = new PersistentCollection($entityManager, $classMetadata, new ArrayCollection(['test'])); if (property_exists(PersistentCollection::class, 'isDirty')) { // Collections >= 2 @@ -38,7 +40,7 @@ public function testCastPersistentCollection() %A -backRefFieldName: null -isDirty: false - -em: Mock_EntityManagerInterface_%s { …3} + -em: $entityManagerClass { …3} -typeClass: Doctrine\ORM\Mapping\ClassMetadata { …} %A EODUMP; @@ -47,7 +49,7 @@ public function testCastPersistentCollection() $expected = <<