Skip to content

Commit

Permalink
Fix PHPStan deprecations in test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
danielburger1337 committed Dec 30, 2024
1 parent ee9cd9e commit f657596
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/DPoPProofFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ public function createProof_boundToNothing_checkPayload(): void
$this->assertEquals($this->clock->now()->getTimestamp(), $value['iat']);

$this->assertArrayHasKey('jti', $value);
$this->assertIsString($value['jti']);
$this->assertTrue(\strlen($value['jti']) === (self::JTI_LENGTH * 2));

$this->assertArrayNotHasKey('ath', $value);
Expand Down Expand Up @@ -366,6 +367,7 @@ public function createProof_boundToJkt_checkPayload(): void
$this->assertEquals($this->clock->now()->getTimestamp(), $value['iat']);

$this->assertArrayHasKey('jti', $value);
$this->assertIsString($value['jti']);
$this->assertTrue(\strlen($value['jti']) === (self::JTI_LENGTH * 2));

$this->assertArrayNotHasKey('ath', $value);
Expand Down Expand Up @@ -427,6 +429,7 @@ public function createProof_boundToAccessToken_addsAthToPayload(): void
$this->assertEquals($this->clock->now()->getTimestamp(), $value['iat']);

$this->assertArrayHasKey('jti', $value);
$this->assertIsString($value['jti']);
$this->assertTrue(\strlen($value['jti']) === (self::JTI_LENGTH * 2));

$this->assertArrayHasKey('ath', $value);
Expand Down Expand Up @@ -497,6 +500,7 @@ public function createProof_hasStoredNonce_addsNonceToPayload(): void
$this->assertEquals($this->clock->now()->getTimestamp(), $value['iat']);

$this->assertArrayHasKey('jti', $value);
$this->assertIsString($value['jti']);
$this->assertTrue(\strlen($value['jti']) === (self::JTI_LENGTH * 2));

$this->assertArrayHasKey('nonce', $value);
Expand Down
1 change: 1 addition & 0 deletions tests/NonceFactory/WebTokenFrameworkNonceFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ public function createNewNonce_payload_hasExpectedClaims(): void
$this->assertEquals($this->clock->now()->getTimestamp(), $payload['iat']);

$this->assertArrayHasKey('jti', $payload);
$this->assertIsString($payload['jti']);
$this->assertTrue(\strlen($payload['jti']) >= 4);

$this->assertArrayHasKey('jkt', $payload);
Expand Down

0 comments on commit f657596

Please sign in to comment.