From e43712f218e10b6bc6f9f8b278eb0b9802908a95 Mon Sep 17 00:00:00 2001 From: Meritoo Date: Sun, 1 Oct 2017 20:40:50 +0200 Subject: [PATCH] Minor refactoring --- src/Result/Item/Participant.php | 2 +- tests/Result/Item/ParticipantShortTest.php | 2 -- tests/Service/ParticipantServiceTest.php | 2 +- tests/Service/SurveyServiceTest.php | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Result/Item/Participant.php b/src/Result/Item/Participant.php index 29beae7..17f02dd 100644 --- a/src/Result/Item/Participant.php +++ b/src/Result/Item/Participant.php @@ -13,7 +13,7 @@ use Meritoo\Common\Utilities\Date; use Meritoo\LimeSurvey\ApiClient\Base\Result\BaseItem; /** - * One item of the result/data: full data of participant + * One item of the result/data: full data of one participant * * @author Krzysztof Niziol * @copyright Meritoo.pl diff --git a/tests/Result/Item/ParticipantShortTest.php b/tests/Result/Item/ParticipantShortTest.php index fab697a..44fd9bf 100644 --- a/tests/Result/Item/ParticipantShortTest.php +++ b/tests/Result/Item/ParticipantShortTest.php @@ -90,7 +90,6 @@ class ParticipantShortTest extends BaseTestCase return [ [ 'tid' => '123', - 'token' => uniqid(), 'participant_info' => [ 'firstname' => 'Lorem', 'lastname' => 'Ipsum', @@ -99,7 +98,6 @@ class ParticipantShortTest extends BaseTestCase ], [ 'tid' => '456', - 'token' => uniqid(), 'participant_info' => [ 'firstname' => 'Dolor', 'lastname' => 'Sit', diff --git a/tests/Service/ParticipantServiceTest.php b/tests/Service/ParticipantServiceTest.php index 6d81f5f..7625079 100644 --- a/tests/Service/ParticipantServiceTest.php +++ b/tests/Service/ParticipantServiceTest.php @@ -184,8 +184,8 @@ class ParticipantServiceTest extends BaseTestCase static::assertNull($this->serviceWithoutParticipants->getParticipant(1, 'john@scott.com')); $participant = $this->serviceWithParticipants->getParticipant(1, 'john@scott.com'); - static::assertInstanceOf(Participant::class, $participant); + static::assertInstanceOf(Participant::class, $participant); static::assertEquals('John', $participant->getFirstName()); static::assertEquals('Scott', $participant->getLastName()); static::assertEquals('john@scott.com', $participant->getEmail()); diff --git a/tests/Service/SurveyServiceTest.php b/tests/Service/SurveyServiceTest.php index b370bc1..a34cf68 100644 --- a/tests/Service/SurveyServiceTest.php +++ b/tests/Service/SurveyServiceTest.php @@ -170,7 +170,7 @@ class SurveyServiceTest extends BaseTestCase $this->createServiceWithSurveys($rpcClientManager, $sessionManager); $surveyId = 123; - $token = 'djf28b47dha0mo83'; + $token = uniqid(); $expectedUrl = sprintf('%s/%d?token=%s', $this->connectionBaseUrl, $surveyId, $token); $participant = new Participant([