forked from snowcap/Emarsys
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from mention-me/dependabot/composer/rector/re…
…ctor-1.1.1 Bump rector/rector from 1.1.0 to 1.1.1
- Loading branch information
Showing
2 changed files
with
27 additions
and
27 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,13 +31,13 @@ class ClientTest extends TestCase | |
/** | ||
* @var MockObject|MockClient | ||
*/ | ||
private MockClient $stubHttpClient; | ||
private MockClient $mockClient; | ||
|
||
protected function setUp(): void | ||
{ | ||
$this->stubHttpClient = new MockClient(); | ||
$this->mockClient = new MockClient(); | ||
$this->client = new Client( | ||
$this->stubHttpClient, | ||
$this->mockClient, | ||
new RequestFactory(), | ||
new StreamFactory(), | ||
'dummy-api-username', | ||
|
@@ -181,23 +181,23 @@ public function testGetEmails(): void | |
$expectedResponse = $this->createMock(ResponseInterface::class); | ||
$expectedResponse->method("getBody")->willReturn($this->createExpectedResponse('emails')); | ||
|
||
$this->stubHttpClient->addResponse($expectedResponse); | ||
$this->mockClient->addResponse($expectedResponse); | ||
$response = $this->client->getEmails(); | ||
$this->assertEquals(Response::REPLY_CODE_OK, $response->getReplyCode()); | ||
|
||
$this->stubHttpClient->addResponse($expectedResponse); | ||
$this->mockClient->addResponse($expectedResponse); | ||
$response = $this->client->getEmails(ClientInterface::EMAIL_STATUS_CODE_READY_TO_LAUNCH); | ||
$this->assertEquals(Response::REPLY_CODE_OK, $response->getReplyCode()); | ||
|
||
$this->stubHttpClient->addResponse($expectedResponse); | ||
$this->mockClient->addResponse($expectedResponse); | ||
$response = $this->client->getEmails(null, 123); | ||
$this->assertEquals(Response::REPLY_CODE_OK, $response->getReplyCode()); | ||
|
||
$this->stubHttpClient->addResponse($expectedResponse); | ||
$this->mockClient->addResponse($expectedResponse); | ||
$response = $this->client->getEmails(ClientInterface::EMAIL_STATUS_CODE_READY_TO_LAUNCH, 123); | ||
$this->assertEquals(Response::REPLY_CODE_OK, $response->getReplyCode()); | ||
|
||
$this->stubHttpClient->addResponse($expectedResponse); | ||
$this->mockClient->addResponse($expectedResponse); | ||
$response = $this->client->getEmails( | ||
ClientInterface::EMAIL_STATUS_CODE_READY_TO_LAUNCH, | ||
123, | ||
|
@@ -223,7 +223,7 @@ public function testCreateEmail(): void | |
{ | ||
$expectedResponse = $this->createMock(ResponseInterface::class); | ||
$expectedResponse->method("getBody")->willReturn($this->createExpectedResponse('createContact')); | ||
$this->stubHttpClient->addResponse($expectedResponse); | ||
$this->mockClient->addResponse($expectedResponse); | ||
|
||
$data = [ | ||
'language' => 'en', | ||
|
@@ -254,7 +254,7 @@ public function testGetContactIdSuccess(): void | |
{ | ||
$expectedResponse = $this->createMock(ResponseInterface::class); | ||
$expectedResponse->method("getBody")->willReturn($this->createExpectedResponse('getContactId')); | ||
$this->stubHttpClient->addResponse($expectedResponse); | ||
$this->mockClient->addResponse($expectedResponse); | ||
|
||
$response = $this->client->getContactId('3', '[email protected]'); | ||
|
||
|
@@ -271,7 +271,7 @@ public function testItReturnsContactData(): void | |
{ | ||
$expectedResponse = $this->createMock(ResponseInterface::class); | ||
$expectedResponse->method("getBody")->willReturn($this->createExpectedResponse('getContactData')); | ||
$this->stubHttpClient->addResponse($expectedResponse); | ||
$this->mockClient->addResponse($expectedResponse); | ||
|
||
$response = $this->client->getContactData([]); | ||
|
||
|
@@ -287,7 +287,7 @@ public function testItCreatesContact(): void | |
{ | ||
$expectedResponse = $this->createMock(ResponseInterface::class); | ||
$expectedResponse->method("getBody")->willReturn($this->createExpectedResponse('createContact')); | ||
$this->stubHttpClient->addResponse($expectedResponse); | ||
$this->mockClient->addResponse($expectedResponse); | ||
|
||
$data = [ | ||
'3' => '[email protected]', | ||
|
@@ -303,7 +303,7 @@ public function testItCanGetFields(): void | |
$expectedResponse = $this->createMock(ResponseInterface::class); | ||
$expectedResponse->method("getBody")->willReturn($this->createExpectedResponse('getFields')); | ||
|
||
$this->stubHttpClient->addResponse($expectedResponse); | ||
$this->mockClient->addResponse($expectedResponse); | ||
|
||
$this->assertCount(72, $this->client->getFields()->getData()); | ||
} | ||
|
@@ -313,7 +313,7 @@ public function testItCanGetSettings(): void | |
$expectedResponse = $this->createMock(ResponseInterface::class); | ||
$expectedResponse->method("getBody")->willReturn($this->createExpectedResponse('getSettings')); | ||
|
||
$this->stubHttpClient->addResponse($expectedResponse); | ||
$this->mockClient->addResponse($expectedResponse); | ||
|
||
$this->assertEquals(2230, $this->client->getSettings()->getData()["id"]); | ||
} | ||
|
@@ -335,7 +335,7 @@ public function testThrowsExceptionIfJsonDepthExceedsLimit(): void | |
$expectedResponse->method("getBody") | ||
->willReturn(Utils::streamFor(json_encode($nestedStructure, JSON_THROW_ON_ERROR))); | ||
|
||
$this->stubHttpClient->addResponse($expectedResponse); | ||
$this->mockClient->addResponse($expectedResponse); | ||
|
||
$this->client->createContact([]); | ||
} | ||
|
@@ -349,7 +349,7 @@ public function testItReturnsEmailResponseSummary(): void | |
{ | ||
$expectedResponse = $this->createMock(ResponseInterface::class); | ||
$expectedResponse->method("getBody")->willReturn($this->createExpectedResponse('getEmailResponseSummary')); | ||
$this->stubHttpClient->addResponse($expectedResponse); | ||
$this->mockClient->addResponse($expectedResponse); | ||
|
||
$response = $this->client->getEmailResponseSummary(12345); | ||
|
||
|