Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
StanBarrows committed Sep 20, 2023
1 parent c220980 commit a64725d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 79 deletions.
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<junit outputFile="build/report.junit.xml"/>
</logging>
<php>
<env name="ZENDESK_ENDPOINT" value=""/>
<env name="ZENDESK_SUBDOMAIN" value=""/>
<env name="ZENDESK_EMAIL_ADDRESS" value=""/>
<env name="ZENDESK_API_TOKEN" value=""/>
</php>
Expand Down
14 changes: 1 addition & 13 deletions src/Requests/CreateSingleTicketRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,10 @@ public function resolveEndpoint(): string
}

public function __construct(
readonly protected array|SingleTicketDTO $createTicket,
readonly protected ?string $onBehalfOf = null,
readonly protected array|SingleTicketDTO $createTicket
) {
}

protected function defaultHeaders(): array
{
$headers = [];

if ($this->onBehalfOf) {
$headers['X-On-Behalf-Of'] = $this->onBehalfOf;
}

return $headers;
}

protected function defaultBody(): array
{
$body = $this->createTicket;
Expand Down
34 changes: 0 additions & 34 deletions src/Requests/ShowUserRequest.php

This file was deleted.

2 changes: 2 additions & 0 deletions tests/Connectors/ZendeskConnectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

use CodebarAg\Zendesk\Requests\SingleTicketRequest;
use CodebarAg\Zendesk\ZendeskConnector;
use Illuminate\Support\Facades\Config;
use Saloon\Http\Faking\MockResponse;
use Saloon\Laravel\Http\Faking\MockClient;

it('will throw an exception if a subdomain is not set', closure: function () {
Config::set('zendesk.subdomain');
$connector = new ZendeskConnector;
$connector->resolveBaseUrl();

Expand Down
31 changes: 0 additions & 31 deletions tests/Requests/ShowUserRequestTest.php

This file was deleted.

0 comments on commit a64725d

Please sign in to comment.