diff --git a/src/Service/ParticipantService.php b/src/Service/ParticipantService.php index c0218fe..89a4342 100644 --- a/src/Service/ParticipantService.php +++ b/src/Service/ParticipantService.php @@ -160,6 +160,11 @@ class ParticipantService */ public function getParticipant($surveyId, $email) { + /* + * I have to get all participants of survey to avoid problem when participants exist but are not loaded + */ + $this->getSurveyParticipants($surveyId); + return $this ->allParticipants ->getParticipantOfSurvey($surveyId, $email); diff --git a/tests/Service/ParticipantServiceTest.php b/tests/Service/ParticipantServiceTest.php index 4a41c39..eb73ecc 100644 --- a/tests/Service/ParticipantServiceTest.php +++ b/tests/Service/ParticipantServiceTest.php @@ -125,7 +125,7 @@ class ParticipantServiceTest extends BaseTestCase public function testGetParticipant() { - $rpcClientManager = $this->getJsonRpcClientManager(0); + $rpcClientManager = $this->getJsonRpcClientManager(1); $sessionManager = $this->getSessionManager(); $this->createServiceWithoutParticipants($rpcClientManager, $sessionManager);