mirror of
https://github.com/wiosna-dev/limesurvey-api-client.git
synced 2026-03-12 02:11:45 +01:00
Minor refactoring
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
@@ -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());
|
||||||
|
|||||||
@@ -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([
|
||||||
|
|||||||
Reference in New Issue
Block a user