This commit is contained in:
2025-09-05 18:34:37 +02:00
parent 2665e43a61
commit c5cedb8bd6

View File

@@ -57,7 +57,7 @@ YAML;
$emProphecy = $this->prophesize(EntityManagerInterface::class);
// persist should be called for StoredObject and Motive at least once
$emProphecy->persist(Argument::type(StoredObject::class))->shouldBeCalled();
$emProphecy->persist(Argument::that(fn($arg) =>
$emProphecy->persist(Argument::that(fn ($arg) =>
// Motive class is in another namespace; just check it's an object with setLabel method
\is_object($arg) && method_exists($arg, 'setLabel')))->shouldBeCalled();
$emProphecy->flush()->shouldBeCalled();