From 33db769a6c7f668f903732ba63b9a0eee545f918 Mon Sep 17 00:00:00 2001 From: Keith Brink Date: Wed, 17 Jul 2024 11:44:40 +0300 Subject: [PATCH] Test coverage --- tests/Unit/Data/TokensTest.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/Unit/Data/TokensTest.php b/tests/Unit/Data/TokensTest.php index 5f331cbf..719bd721 100644 --- a/tests/Unit/Data/TokensTest.php +++ b/tests/Unit/Data/TokensTest.php @@ -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() @@ -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); } }