Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Events/XeroAuthorized.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class XeroAuthorized
{
public string $token;
public string $refresh_token;
public array $id_token;
public string $id_token;
public string $expires;
public array $tenants;

Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/Routes/CallbackTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function test_you_can_get_callback_url()
Event::assertDispatched(XeroAuthorized::class, function (XeroAuthorized $event) {
$this->assertEquals('token', $event->token);
$this->assertEquals('refresh-token', $event->refresh_token);
$this->assertEquals(['token' => 'foo'], $event->id_token);
$this->assertEquals('foo', $event->id_token);
$this->assertEquals('1234', $event->expires);
$this->assertEquals([
[
Expand Down
4 changes: 1 addition & 3 deletions tests/TestSupport/Mocks/MockAccessToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ public function hasExpired()
public function getValues()
{
return [
'id_token' => [
'token' => 'foo',
],
'id_token' => 'foo'
];
}

Expand Down
12 changes: 3 additions & 9 deletions tests/Unit/CredentialManagersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ public function test_you_can_get_credential_store_with_existing_data($sutClass,
$createExistingData($sut, $existingData = [
'token' => 'default-token',
'refresh_token' => 'default-refresh-token',
'id_token' => [
'token' => 'foo',
],
'id_token' => 'foo',
'expires' => $expires = strtotime('+1 hour'),
'tenants' => [
[
Expand Down Expand Up @@ -126,9 +124,7 @@ public function test_that_it_stores_data_correctly($sutClass, $setupFunction, $c
$this->assertEquals([
'token' => 'token',
'refresh_token' => 'refresh-token',
'id_token' => [
'token' => 'foo',
],
'id_token' => 'foo',
'expires' => '1234',
'tenants' => [
'tenant' => 'tenant_id',
Expand Down Expand Up @@ -161,9 +157,7 @@ public function test_that_it_can_refresh_its_token($sutClass, $setupFunction, $c
$this->assertEquals([
'token' => 'token',
'refresh_token' => 'refresh-token',
'id_token' => [
'token' => 'foo',
],
'id_token' => 'foo',
'expires' => '1234',
'tenants' => null,
], $sut->getData());
Expand Down