Minor refactoring

This commit is contained in:
Meritoo
2017-10-01 20:40:50 +02:00
parent e464ae30af
commit e43712f218
4 changed files with 3 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ use Meritoo\Common\Utilities\Date;
use Meritoo\LimeSurvey\ApiClient\Base\Result\BaseItem; 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 <krzysztof.niziol@meritoo.pl> * @author Krzysztof Niziol <krzysztof.niziol@meritoo.pl>
* @copyright Meritoo.pl * @copyright Meritoo.pl

View File

@@ -90,7 +90,6 @@ class ParticipantShortTest extends BaseTestCase
return [ return [
[ [
'tid' => '123', 'tid' => '123',
'token' => uniqid(),
'participant_info' => [ 'participant_info' => [
'firstname' => 'Lorem', 'firstname' => 'Lorem',
'lastname' => 'Ipsum', 'lastname' => 'Ipsum',
@@ -99,7 +98,6 @@ class ParticipantShortTest extends BaseTestCase
], ],
[ [
'tid' => '456', 'tid' => '456',
'token' => uniqid(),
'participant_info' => [ 'participant_info' => [
'firstname' => 'Dolor', 'firstname' => 'Dolor',
'lastname' => 'Sit', 'lastname' => 'Sit',

View File

@@ -184,8 +184,8 @@ class ParticipantServiceTest extends BaseTestCase
static::assertNull($this->serviceWithoutParticipants->getParticipant(1, 'john@scott.com')); static::assertNull($this->serviceWithoutParticipants->getParticipant(1, 'john@scott.com'));
$participant = $this->serviceWithParticipants->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('John', $participant->getFirstName());
static::assertEquals('Scott', $participant->getLastName()); static::assertEquals('Scott', $participant->getLastName());
static::assertEquals('john@scott.com', $participant->getEmail()); static::assertEquals('john@scott.com', $participant->getEmail());

View File

@@ -170,7 +170,7 @@ class SurveyServiceTest extends BaseTestCase
$this->createServiceWithSurveys($rpcClientManager, $sessionManager); $this->createServiceWithSurveys($rpcClientManager, $sessionManager);
$surveyId = 123; $surveyId = 123;
$token = 'djf28b47dha0mo83'; $token = uniqid();
$expectedUrl = sprintf('%s/%d?token=%s', $this->connectionBaseUrl, $surveyId, $token); $expectedUrl = sprintf('%s/%d?token=%s', $this->connectionBaseUrl, $surveyId, $token);
$participant = new Participant([ $participant = new Participant([