Skip to content

Commit

Permalink
Merge pull request #111 from mention-me/dependabot/composer/rector/re…
Browse files Browse the repository at this point in the history
…ctor-1.1.1

Bump rector/rector from 1.1.0 to 1.1.1
  • Loading branch information
ryanmab authored Jun 21, 2024
2 parents e7b00ae + 89b16dc commit 90b497e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
22 changes: 11 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions tests/Unit/Suites/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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,
Expand All @@ -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',
Expand Down Expand Up @@ -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]');

Expand All @@ -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([]);

Expand All @@ -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]',
Expand All @@ -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());
}
Expand All @@ -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"]);
}
Expand All @@ -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([]);
}
Expand All @@ -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);

Expand Down

0 comments on commit 90b497e

Please sign in to comment.