Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ecoologic committed Oct 10, 2023
1 parent 617b010 commit ac68725
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
16 changes: 10 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions src/Zendesk/API/Resources/Chat/Apps.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class Apps extends ResourceAbstract
/**
* @var string
*/
protected $apiBasePath = 'api/chat/';
// TODO: api/v2
protected $apiBasePath = '';

/**
* {@inheritdoc}
Expand Down
2 changes: 1 addition & 1 deletion tests/Zendesk/API/UnitTests/Core/AuthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/Zendesk/API/UnitTests/Embeddable/ConfigSetsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/Zendesk/API/UnitTests/HttpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public function requestExceptionsProvider()
return [
[ServerException::class, true],
[ClientException::class, true],
// TODO: [ConnectException::class, false],
[TooManyRedirectsException::class, false]
];
}
Expand Down

0 comments on commit ac68725

Please sign in to comment.