Skip to content

Commit

Permalink
Test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
keithbrink committed Jul 17, 2024
1 parent 7555c22 commit 33db769
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/Unit/Data/TokensTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ public function testSetupTokensWithExistingDate()

$this->assertEquals($access_token, $grantless_token->access_token);
$this->assertEquals($expires_at, $grantless_token->expires_at);

$restricted_data_token = new RestrictedDataToken(
access_token: $access_token,
path: '/bearer',
expires_at: $expires_at,
);

$this->assertEquals($access_token, $restricted_data_token->access_token);
$this->assertEquals('/bearer', $restricted_data_token->path);
$this->assertEquals($expires_at, $restricted_data_token->expires_at);
}

public function testSetupTokensWithNoExpiry()
Expand All @@ -98,5 +108,15 @@ public function testSetupTokensWithNoExpiry()

$this->assertEquals($access_token, $grantless_token->access_token);
$this->assertNull($grantless_token->expires_at);

$restricted_data_token = new RestrictedDataToken(
access_token: $access_token,
path: '/bearer',
expires_at: $expires_at,
);

$this->assertEquals($access_token, $restricted_data_token->access_token);
$this->assertEquals('/bearer', $restricted_data_token->path);
$this->assertNull($restricted_data_token->expires_at);
}
}

0 comments on commit 33db769

Please sign in to comment.