From 7b51cc5665183491127af960b3eab63e133cb12b Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Tue, 14 May 2024 15:36:25 -0500 Subject: [PATCH] CI: Fix call to SessionRepository::getSessionsByUser - refs BT#21633 --- tests/CoreBundle/Repository/SessionRepositoryTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/CoreBundle/Repository/SessionRepositoryTest.php b/tests/CoreBundle/Repository/SessionRepositoryTest.php index 2cc87e8e5a..fde916c5c7 100644 --- a/tests/CoreBundle/Repository/SessionRepositoryTest.php +++ b/tests/CoreBundle/Repository/SessionRepositoryTest.php @@ -543,6 +543,7 @@ class SessionRepositoryTest extends AbstractApiTest public function testSessionRelUser(): void { $em = $this->getEntityManager(); + /** @var SessionRepository $sessionRepo */ $sessionRepo = self::getContainer()->get(SessionRepository::class); $url = $this->getAccessUrl(); @@ -582,7 +583,7 @@ class SessionRepositoryTest extends AbstractApiTest $this->assertSame(2, $session->getAllUsersFromCourse(Session::STUDENT)->count()); $student1 = $this->getUser('student1'); - $sessions = $sessionRepo->getSessionsByUser($student1, $url); + $sessions = $sessionRepo->getSessionsByUser($student1, $url)->getQuery()->getResult(); $this->assertCount(1, $sessions); $sessions = $sessionRepo->getSessionCoursesByStatusInUserSubscription($student1, $session, Session::STUDENT);