notification: fix test

This commit is contained in:
Julien Fastré 2022-01-11 11:24:11 +01:00
parent 1650f30a59
commit 6b1310148f

View File

@ -16,6 +16,7 @@ use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Repository\UserRepository;
use Chill\MainBundle\Test\PrepareClientTrait;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use DateTimeImmutable;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
@ -55,7 +56,8 @@ final class NotificationApiControllerTest extends WebTestCase
->setRelatedEntityClass(AccompanyingPeriod::class)
->setRelatedEntityId(0)
->setSender($userB)
->addAddressee($userA);
->addAddressee($userA)
->setUpdatedAt(new DateTimeImmutable());
$em->persist($notification);
$em->refresh($notification);
$em->flush();