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] ]; }