From 6908134b7cafd3873d2c9b69a78dcdb32b259fae Mon Sep 17 00:00:00 2001 From: "Erik Trapin (ecoologic)" Date: Mon, 9 Oct 2023 08:03:10 +1000 Subject: [PATCH 1/6] SatisfactionRatingsTest unskipped --- .../UnitTests/Core/SatisfactionRatingsTest.php | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php b/tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php index 64e89502..3cba1aa5 100755 --- a/tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php +++ b/tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php @@ -40,26 +40,18 @@ function () use ($ticketId, $postParams) { ); } - /** - * Test the create method requires a ticket id - * - * XexpectedException Zendesk\API\Exceptions\MissingParametersException - * XexpectedExceptionMessage Missing parameters: 'ticket_id' must be supplied for Zendesk\API\Resources\Core\SatisfactionRatings::create - */ public function testCreateNeedsTicketId() { - $this->markTestSkipped('CBP TODO'); - // replace X with @ above - $postParams = [ 'score' => 'good', 'comment' => 'Awesome Support!', ]; + $this->setExpectedException( + 'Zendesk\API\Exceptions\MissingParametersException', + "Missing parameters: 'ticket_id' must be supplied for Zendesk\API\Resources\Core\SatisfactionRatings::create" + ); + $this->client->satisfactionRatings()->create($postParams); } } -// 2) Zendesk\API\UnitTests\Core\SatisfactionRatingsTest::testCreateNeedsTicketId -// count(): Parameter must be an array or an object that implements Countable -// -// phpvfscomposer:///app/vendor/phpunit/phpunit/phpunit:35 From 7d470f787268cfa0db2f9c1d0e3b89891a17696c Mon Sep 17 00:00:00 2001 From: "Erik Trapin (ecoologic)" Date: Mon, 9 Oct 2023 08:16:01 +1000 Subject: [PATCH 2/6] Doc --- docker-compose.yml | 2 ++ tests/Zendesk/API/UnitTests/Chat/AppsTest.php | 10 +++++++++- tests/Zendesk/API/UnitTests/Core/AuthTest.php | 2 +- .../Exceptions/ApiResponseExceptionTest.php | 2 +- tests/Zendesk/API/UnitTests/HttpTest.php | 19 +++++++++---------- .../UnitTests/Middleware/RetryHandlerTest.php | 2 +- 6 files changed, 23 insertions(+), 14 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index c28da4a3..26821a68 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,8 @@ services: - .:/app - vendor:/app/vendor command: vendor/bin/phpunit --testsuite "Zendesk API Unit Test Suites" + # command: vendor/bin/phpunit --debug --filter testCreateNeedsTicketId tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php + # command: vendor/bin/phpunit --debug tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php volumes: vendor: diff --git a/tests/Zendesk/API/UnitTests/Chat/AppsTest.php b/tests/Zendesk/API/UnitTests/Chat/AppsTest.php index 72cd496d..7e631ed0 100644 --- a/tests/Zendesk/API/UnitTests/Chat/AppsTest.php +++ b/tests/Zendesk/API/UnitTests/Chat/AppsTest.php @@ -12,7 +12,15 @@ class AppsTest extends BasicTest */ public function testInstall() { - $this->markTestSkipped('CBP TODO'); + $this->markTestSkipped('CBP TODO assert'); + // 1) Zendesk\API\UnitTests\Chat\AppsTest::testInstall + // Failed asserting that the API basepath is /api/chat/ + // Failed asserting that false is identical to 0. + // /app/tests/Zendesk/API/UnitTests/BasicTest.php:190 + // /app/tests/Zendesk/API/UnitTests/BasicTest.php:120 + // /app/tests/Zendesk/API/UnitTests/BasicTest.php:233 + // /app/tests/Zendesk/API/UnitTests/Chat/AppsTest.php:31 + // phpvfscomposer:///app/vendor/phpunit/phpunit/phpunit:35 $faker = Factory::create(); $postFields = [ diff --git a/tests/Zendesk/API/UnitTests/Core/AuthTest.php b/tests/Zendesk/API/UnitTests/Core/AuthTest.php index 71fde21f..aa0a6bdf 100755 --- a/tests/Zendesk/API/UnitTests/Core/AuthTest.php +++ b/tests/Zendesk/API/UnitTests/Core/AuthTest.php @@ -20,7 +20,7 @@ class AuthTest extends BasicTest */ public function testAnonymousAccess() { - $this->markTestSkipped('CBP TODO'); + $this->markTestSkipped('CBP TODO deprecated'); // mock client $client = $this diff --git a/tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php b/tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php index 63db7965..f702a440 100644 --- a/tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php +++ b/tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php @@ -12,7 +12,7 @@ class ApiResponseExceptionTest extends BasicTest */ public function testPreviousException() { - $this->markTestSkipped('CBP TODO'); + $this->markTestSkipped('CBP TODO deprecated'); $message = 'The previous exception was not passed to ApiResponseException'; $mockException = $this diff --git a/tests/Zendesk/API/UnitTests/HttpTest.php b/tests/Zendesk/API/UnitTests/HttpTest.php index 060fb088..79bf0d33 100644 --- a/tests/Zendesk/API/UnitTests/HttpTest.php +++ b/tests/Zendesk/API/UnitTests/HttpTest.php @@ -19,16 +19,15 @@ class HttpTest extends BasicTest */ public function testOriginalRequestExceptionIsPreserved() { - $this->markTestSkipped('CBP TODO'); - + $this->markTestSkipped('CBP TODO deprecation'); $faker = Factory::create(); $exceptionMessage = $faker->sentence; $exception = $this->mockRequestException($exceptionMessage); $guzzleClient = $this->getMockBuilder(GuzzleClient::class) - ->disableOriginalConstructor() - ->getMock(); + ->disableOriginalConstructor() + ->getMock(); $guzzleClient->expects($this->once()) ->method('send') ->will($this->throwException($exception)); @@ -70,14 +69,14 @@ public function testOriginalRequestExceptionIsPreserved() private function mockRequestException($message) { $request = $this->getMockBuilder(Request::class) - ->disableOriginalConstructor() - ->getMock(); + ->disableOriginalConstructor() + ->getMock(); $response = $this->getMockBuilder(Response::class) - ->disableOriginalConstructor() - ->getMock(); + ->disableOriginalConstructor() + ->getMock(); $body = $this->getMockBuilder(Stream::class) - ->disableOriginalConstructor() - ->getMock(); + ->disableOriginalConstructor() + ->getMock(); $request->method('getBody') ->will($this->returnValue($body)); $response->method('getBody') diff --git a/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php b/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php index ed25cd3a..56a2b79d 100644 --- a/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php +++ b/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php @@ -205,7 +205,7 @@ public function retryDelayProvider() */ public function testHttpClientRetry() { - $this->markTestSkipped('CBP TODO'); + $this->markTestSkipped('CBP TODO deprecated'); $this->setUp(); $config = $this->client->guzzle->getConfig(); From f3770dcb02b3ca741ae819e0a32c7d37675432fc Mon Sep 17 00:00:00 2001 From: "Erik Trapin (ecoologic)" Date: Mon, 9 Oct 2023 10:20:48 +1000 Subject: [PATCH 3/6] testHttpClientRetry unskipped --- tests/Zendesk/API/UnitTests/Core/AuthTest.php | 4 ++-- .../API/UnitTests/Exceptions/ApiResponseExceptionTest.php | 2 +- tests/Zendesk/API/UnitTests/HttpTest.php | 2 +- .../Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php | 8 ++------ tests/bootstrap.php | 5 ++--- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/tests/Zendesk/API/UnitTests/Core/AuthTest.php b/tests/Zendesk/API/UnitTests/Core/AuthTest.php index aa0a6bdf..8bc3c7eb 100755 --- a/tests/Zendesk/API/UnitTests/Core/AuthTest.php +++ b/tests/Zendesk/API/UnitTests/Core/AuthTest.php @@ -20,7 +20,7 @@ class AuthTest extends BasicTest */ public function testAnonymousAccess() { - $this->markTestSkipped('CBP TODO deprecated'); + $this->markTestSkipped('CBP TODO mocking'); // mock client $client = $this @@ -40,7 +40,7 @@ public function testAnonymousAccess() // send request $client->guzzle = $this->getMockBuilder(Client::class)->getMock(); - $client->guzzle->method('send')->willReturn(new Response); + $client->guzzle->method('send')->willReturn(new Response(200, [], '')); Http::send($client, ''); } diff --git a/tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php b/tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php index f702a440..ff66fd1e 100644 --- a/tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php +++ b/tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php @@ -12,7 +12,7 @@ class ApiResponseExceptionTest extends BasicTest */ public function testPreviousException() { - $this->markTestSkipped('CBP TODO deprecated'); + $this->markTestSkipped('CBP TODO mocking'); $message = 'The previous exception was not passed to ApiResponseException'; $mockException = $this diff --git a/tests/Zendesk/API/UnitTests/HttpTest.php b/tests/Zendesk/API/UnitTests/HttpTest.php index 79bf0d33..0df7e016 100644 --- a/tests/Zendesk/API/UnitTests/HttpTest.php +++ b/tests/Zendesk/API/UnitTests/HttpTest.php @@ -19,7 +19,7 @@ class HttpTest extends BasicTest */ public function testOriginalRequestExceptionIsPreserved() { - $this->markTestSkipped('CBP TODO deprecation'); + $this->markTestSkipped('CBP TODO mocking'); $faker = Factory::create(); $exceptionMessage = $faker->sentence; diff --git a/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php b/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php index 56a2b79d..1ce5a741 100644 --- a/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php +++ b/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php @@ -195,7 +195,7 @@ public function retryDelayProvider() return [ [20000, 1, 300, 'for each request delays should be 100ms'], // all delays are 100ms [20000, 2, 1400, 'delay should have an exponential growth'], // for each retry delays are 200, 400, 800 ms - [1000, 3, 2200, 'delay should not exceed max interval'] // for each retry delays are 300, 900, 1000 ms + // TODO: [1000, 3, 2200, 'delay should not exceed max interval'] // for each retry delays are 300, 900, 1000 ms ]; } @@ -205,15 +205,11 @@ public function retryDelayProvider() */ public function testHttpClientRetry() { - $this->markTestSkipped('CBP TODO deprecated'); - $this->setUp(); $config = $this->client->guzzle->getConfig(); $sslException = new RequestException( 'ssl', - $this->getMockBuilder(Request::class) - ->disableOriginalConstructor() - ->getMock() + new Request('GET', '') ); $mock = new MockHandler([ diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 52477cad..44b74ede 100755 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,8 +1,7 @@ Date: Mon, 9 Oct 2023 10:57:24 +1000 Subject: [PATCH 4/6] testRetryDelay unskipped --- tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php | 4 ++++ tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php b/tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php index 3cba1aa5..890e8374 100755 --- a/tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php +++ b/tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php @@ -40,6 +40,10 @@ function () use ($ticketId, $postParams) { ); } + + /** + * Test the create method requires a ticket id + */ public function testCreateNeedsTicketId() { $postParams = [ diff --git a/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php b/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php index 1ce5a741..8c25cd7e 100644 --- a/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php +++ b/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php @@ -195,7 +195,7 @@ public function retryDelayProvider() return [ [20000, 1, 300, 'for each request delays should be 100ms'], // all delays are 100ms [20000, 2, 1400, 'delay should have an exponential growth'], // for each retry delays are 200, 400, 800 ms - // TODO: [1000, 3, 2200, 'delay should not exceed max interval'] // for each retry delays are 300, 900, 1000 ms + [1000, 3, 2200, 'delay should not exceed max interval'] // for each retry delays are 300, 900, 1000 ms ]; } From 617b0108b75d3d8af702cf1b5fe5276f71e117fc Mon Sep 17 00:00:00 2001 From: "Erik Trapin (ecoologic)" Date: Mon, 9 Oct 2023 14:27:21 +1000 Subject: [PATCH 5/6] AppsTest#testInstall --- docker-compose.yml | 2 -- src/Zendesk/API/Resources/Chat/Apps.php | 1 + tests/Zendesk/API/UnitTests/BasicTest.php | 9 +++++---- tests/Zendesk/API/UnitTests/Chat/AppsTest.php | 13 ++----------- .../API/UnitTests/Core/SatisfactionRatingsTest.php | 1 - 5 files changed, 8 insertions(+), 18 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 26821a68..c28da4a3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,8 +8,6 @@ services: - .:/app - vendor:/app/vendor command: vendor/bin/phpunit --testsuite "Zendesk API Unit Test Suites" - # command: vendor/bin/phpunit --debug --filter testCreateNeedsTicketId tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php - # command: vendor/bin/phpunit --debug tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php volumes: vendor: diff --git a/src/Zendesk/API/Resources/Chat/Apps.php b/src/Zendesk/API/Resources/Chat/Apps.php index 2d556d91..49fafa6d 100644 --- a/src/Zendesk/API/Resources/Chat/Apps.php +++ b/src/Zendesk/API/Resources/Chat/Apps.php @@ -15,6 +15,7 @@ class Apps extends ResourceAbstract * @var string */ protected $apiBasePath = 'api/chat/'; + // TODO: api/v2 /** * {@inheritdoc} diff --git a/tests/Zendesk/API/UnitTests/BasicTest.php b/tests/Zendesk/API/UnitTests/BasicTest.php index 848eeaa5..dc22b1f6 100644 --- a/tests/Zendesk/API/UnitTests/BasicTest.php +++ b/tests/Zendesk/API/UnitTests/BasicTest.php @@ -185,9 +185,8 @@ public function assertRequestIs($options, $index = 0) if (isset($options['apiBasePath'])) { $this->assertSame( - 0, - strpos($request->getUri()->getPath(), $options['apiBasePath']), - "Failed asserting that the API basepath is {$options['apiBasePath']}" + 0, strpos($request->getUri()->getPath(), $options['apiBasePath']), + "Failed asserting apiBasePath: expected: {$options['apiBasePath']}, actual: {$request->getUri()->getPath()}" ); } @@ -195,7 +194,9 @@ public function assertRequestIs($options, $index = 0) // Truncate the base path from the target, this was added since the existing usage pattern for // $options['endpoint'] does not include the api/v2 base path $endpoint = preg_replace('/^' . preg_quote($options['apiBasePath'], '/') . '/', '', $request->getUri()->getPath()); - $this->assertEquals($options['endpoint'], $endpoint); + $this->assertEquals( + $options['endpoint'], $endpoint, + "Failed asserting endpoint: expected: {$options['endpoint']}, actual: {$endpoint}"); } if (isset($options['queryParams'])) { diff --git a/tests/Zendesk/API/UnitTests/Chat/AppsTest.php b/tests/Zendesk/API/UnitTests/Chat/AppsTest.php index 7e631ed0..844d96c3 100644 --- a/tests/Zendesk/API/UnitTests/Chat/AppsTest.php +++ b/tests/Zendesk/API/UnitTests/Chat/AppsTest.php @@ -12,19 +12,10 @@ class AppsTest extends BasicTest */ public function testInstall() { - $this->markTestSkipped('CBP TODO assert'); - // 1) Zendesk\API\UnitTests\Chat\AppsTest::testInstall - // Failed asserting that the API basepath is /api/chat/ - // Failed asserting that false is identical to 0. - // /app/tests/Zendesk/API/UnitTests/BasicTest.php:190 - // /app/tests/Zendesk/API/UnitTests/BasicTest.php:120 - // /app/tests/Zendesk/API/UnitTests/BasicTest.php:233 - // /app/tests/Zendesk/API/UnitTests/Chat/AppsTest.php:31 - // phpvfscomposer:///app/vendor/phpunit/phpunit/phpunit:35 - $faker = Factory::create(); $postFields = [ 'app_id' => $faker->numberBetween(1), + 'product_name' => 'chat', 'settings' => [ 'name' => $faker->word, @@ -36,7 +27,7 @@ public function testInstall() $this->client->chat->apps()->install($postFields); }, 'apps/installations.json', 'POST', [ 'postFields' => $postFields, - 'apiBasePath' => '/api/chat/', + 'apiBasePath' => '/api/v2/' ]); } } diff --git a/tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php b/tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php index 890e8374..b218f0d3 100755 --- a/tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php +++ b/tests/Zendesk/API/UnitTests/Core/SatisfactionRatingsTest.php @@ -40,7 +40,6 @@ function () use ($ticketId, $postParams) { ); } - /** * Test the create method requires a ticket id */ From ac687254458c82f9ee6b008c94623fb5b6338e43 Mon Sep 17 00:00:00 2001 From: "Erik Trapin (ecoologic)" Date: Tue, 10 Oct 2023 14:11:15 +1000 Subject: [PATCH 6/6] Doc --- CONTRIBUTING.md | 16 ++++++++++------ README.md | 3 +-- src/Zendesk/API/Resources/Chat/Apps.php | 3 +-- tests/Zendesk/API/UnitTests/Core/AuthTest.php | 2 +- .../API/UnitTests/Embeddable/ConfigSetsTest.php | 1 - .../Exceptions/ApiResponseExceptionTest.php | 2 +- tests/Zendesk/API/UnitTests/HttpTest.php | 2 +- .../UnitTests/Middleware/RetryHandlerTest.php | 1 - 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e78f4edb..811ba71f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,18 +10,22 @@ ### Test suite -```sh -# TODO: Update CONTRIBUTING -docker-compose up -docker run -it --rm -v $(pwd):/app zendesk_api_client_php-app bash -``` - The test suite is run via phpunit. Note that these are all live tests that must be run targeted at a real Zendesk instance. Credentials can be provided by setting the environment variables in phpunit.xml; a sample is provided at phpunit.xml.dist. To run the unit tests: `vendor/bin/phpunit --testsuite "Zendesk API Unit Test Suites"` To run the live tests: `vendor/bin/phpunit --testsuite "Zendesk API Live Test Suites"` +### Docker + +If you prefer to use Docker for running your tests: + +```sh +# Run the specs +docker-compose up +# Or open a shell in the container +docker run -it --rm -v $(pwd):/app zendesk_api_client_php-app bash +``` ## Coding Standard diff --git a/README.md b/README.md index 84fda00c..f3d0ac9b 100755 --- a/README.md +++ b/README.md @@ -18,8 +18,7 @@ This client **only** supports Zendesk's API v2. Please see our [API documentati ## Requirements -* TODO: Update README -* PHP 5.5+ +* PHP 7.4+ ## Installation diff --git a/src/Zendesk/API/Resources/Chat/Apps.php b/src/Zendesk/API/Resources/Chat/Apps.php index 49fafa6d..ea55efaf 100644 --- a/src/Zendesk/API/Resources/Chat/Apps.php +++ b/src/Zendesk/API/Resources/Chat/Apps.php @@ -14,8 +14,7 @@ class Apps extends ResourceAbstract /** * @var string */ - protected $apiBasePath = 'api/chat/'; - // TODO: api/v2 + protected $apiBasePath = ''; /** * {@inheritdoc} diff --git a/tests/Zendesk/API/UnitTests/Core/AuthTest.php b/tests/Zendesk/API/UnitTests/Core/AuthTest.php index 8bc3c7eb..de8c1c08 100755 --- a/tests/Zendesk/API/UnitTests/Core/AuthTest.php +++ b/tests/Zendesk/API/UnitTests/Core/AuthTest.php @@ -20,7 +20,7 @@ class AuthTest extends BasicTest */ public function testAnonymousAccess() { - $this->markTestSkipped('CBP TODO mocking'); + $this->markTestSkipped('Broken in PHP 7.4 (mocking)'); // mock client $client = $this diff --git a/tests/Zendesk/API/UnitTests/Embeddable/ConfigSetsTest.php b/tests/Zendesk/API/UnitTests/Embeddable/ConfigSetsTest.php index 9b326959..b8621055 100644 --- a/tests/Zendesk/API/UnitTests/Embeddable/ConfigSetsTest.php +++ b/tests/Zendesk/API/UnitTests/Embeddable/ConfigSetsTest.php @@ -40,7 +40,6 @@ public function testUpdate() $this->assertEndpointCalled(function () use ($params, $id) { $this->client->embeddable->configSets()->update($id, $params); - // TODO: Verify calls work }, "api/v2/embeddable/api/config_sets/{$id}.json", 'PUT', [ 'apiBasePath' => '/', 'postFields' => ['config_set' => $params], diff --git a/tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php b/tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php index ff66fd1e..073c7995 100644 --- a/tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php +++ b/tests/Zendesk/API/UnitTests/Exceptions/ApiResponseExceptionTest.php @@ -12,7 +12,7 @@ class ApiResponseExceptionTest extends BasicTest */ public function testPreviousException() { - $this->markTestSkipped('CBP TODO mocking'); + $this->markTestSkipped('Broken in PHP 7.4 (mocking)'); $message = 'The previous exception was not passed to ApiResponseException'; $mockException = $this diff --git a/tests/Zendesk/API/UnitTests/HttpTest.php b/tests/Zendesk/API/UnitTests/HttpTest.php index 0df7e016..bfad1461 100644 --- a/tests/Zendesk/API/UnitTests/HttpTest.php +++ b/tests/Zendesk/API/UnitTests/HttpTest.php @@ -19,7 +19,7 @@ class HttpTest extends BasicTest */ public function testOriginalRequestExceptionIsPreserved() { - $this->markTestSkipped('CBP TODO mocking'); + $this->markTestSkipped('Broken in PHP 7.4 (mocking)'); $faker = Factory::create(); $exceptionMessage = $faker->sentence; diff --git a/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php b/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php index 8c25cd7e..ecf5292b 100644 --- a/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php +++ b/tests/Zendesk/API/UnitTests/Middleware/RetryHandlerTest.php @@ -55,7 +55,6 @@ public function requestExceptionsProvider() return [ [ServerException::class, true], [ClientException::class, true], - // TODO: [ConnectException::class, false], [TooManyRedirectsException::class, false] ]; }