From 0c44140c8937fbb979d3fec3545e293a51688b53 Mon Sep 17 00:00:00 2001 From: Meritoo Date: Sun, 1 Oct 2017 13:42:42 +0200 Subject: [PATCH] MissingParticipantOfSurveyException - fix message --- src/Exception/MissingParticipantOfSurveyException.php | 2 +- tests/Exception/MissingParticipantOfSurveyExceptionTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Exception/MissingParticipantOfSurveyException.php b/src/Exception/MissingParticipantOfSurveyException.php index 11d7dd1..4f58849 100644 --- a/src/Exception/MissingParticipantOfSurveyException.php +++ b/src/Exception/MissingParticipantOfSurveyException.php @@ -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); } diff --git a/tests/Exception/MissingParticipantOfSurveyExceptionTest.php b/tests/Exception/MissingParticipantOfSurveyExceptionTest.php index 5ba04c6..88419c3 100644 --- a/tests/Exception/MissingParticipantOfSurveyExceptionTest.php +++ b/tests/Exception/MissingParticipantOfSurveyExceptionTest.php @@ -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), ]; } }