Skip to content

Commit 7b51cc5

Browse files
committed
CI: Fix call to SessionRepository::getSessionsByUser - refs BT#21633
1 parent e9981a5 commit 7b51cc5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/CoreBundle/Repository/SessionRepositoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ public function testCreateWithSessionCategory(): void
543543
public function testSessionRelUser(): void
544544
{
545545
$em = $this->getEntityManager();
546+
/** @var SessionRepository $sessionRepo */
546547
$sessionRepo = self::getContainer()->get(SessionRepository::class);
547548

548549
$url = $this->getAccessUrl();
@@ -582,7 +583,7 @@ public function testSessionRelUser(): void
582583
$this->assertSame(2, $session->getAllUsersFromCourse(Session::STUDENT)->count());
583584

584585
$student1 = $this->getUser('student1');
585-
$sessions = $sessionRepo->getSessionsByUser($student1, $url);
586+
$sessions = $sessionRepo->getSessionsByUser($student1, $url)->getQuery()->getResult();
586587
$this->assertCount(1, $sessions);
587588

588589
$sessions = $sessionRepo->getSessionCoursesByStatusInUserSubscription($student1, $session, Session::STUDENT);

0 commit comments

Comments
 (0)