-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for
firebase/php-jwt
Version 6 (#32)
* wip * wip * wip
- Loading branch information
Showing
5 changed files
with
21 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
composer.phar | ||
composer.lock | ||
.DS_Store | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
namespace League\OAuth2\Client\Test\Token; | ||
|
||
use Firebase\JWT\Key; | ||
use League\OAuth2\Client\Token\AppleAccessToken; | ||
use PHPUnit\Framework\TestCase; | ||
use Mockery as m; | ||
|
@@ -16,7 +17,7 @@ public function testCreatingAccessToken() | |
{ | ||
$externalJWTMock = m::mock('overload:Firebase\JWT\JWT'); | ||
$externalJWTMock->shouldReceive('decode') | ||
->with('something', 'examplekey', ['RS256']) | ||
->with('something', 'examplekey') | ||
->once() | ||
->andReturn([ | ||
'sub' => '123.abc.123', | ||
|
@@ -37,6 +38,8 @@ public function testCreatingAccessToken() | |
$this->assertEquals('access_token', $accessToken->getToken()); | ||
$this->assertEquals('[email protected]', $accessToken->getEmail()); | ||
$this->assertTrue($accessToken->isPrivateEmail()); | ||
|
||
$this->assertTrue(true); | ||
} | ||
|
||
public function testCreateFailsBecauseNoIdTokenIsSet() | ||
|
@@ -73,7 +76,7 @@ public function testCreatingAccessTokenFailsBecauseNoDecodingIsPossible() | |
|
||
$externalJWTMock = m::mock('overload:Firebase\JWT\JWT'); | ||
$externalJWTMock->shouldReceive('decode') | ||
->with('something', 'examplekey', ['RS256']) | ||
->with('something', 'examplekey') | ||
->once() | ||
->andReturnNull(); | ||
|
||
|