MissingParticipantOfSurveyException - fix message

This commit is contained in:
Meritoo
2017-10-01 13:42:42 +02:00
parent 41156ed058
commit 0c44140c89
2 changed files with 3 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ class MissingParticipantOfSurveyException extends \Exception
public function __construct($surveyId, $email)
{
$template = 'Participant with e-mail %s of survey with ID %s is missing. Maybe was not added to the survey?';
$message = sprintf($template, $surveyId, $email);
$message = sprintf($template, $email, $surveyId);
parent::__construct($message);
}

View File

@@ -45,13 +45,13 @@ class MissingParticipantOfSurveyExceptionTest extends BaseTestCase
yield[
1,
'lorem@ipsum.com',
sprintf($template, 1, 'lorem@ipsum.com'),
sprintf($template, 'lorem@ipsum.com', 1),
];
yield[
1234,
'another@email.comm',
sprintf($template, 1234, 'another@email.comm'),
sprintf($template, 'another@email.comm', 1234),
];
}
}