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: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
php: [8.1, 8.2, 8.3, 8.4]
laravel: [10, 11, 12]
include:
- php: 8.5
laravel: 12
- php: 8.2
laravel: 9
- php: 8.1
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
},
"require-dev": {
"mockery/mockery": "^1.0",
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0|^10.0",
"orchestra/testbench": "^4.18|^5.20|^6.47|^7.55|^8.36|^9.15|^10.8",
"phpstan/phpstan": "^1.12.23",
"phpunit/phpunit": "^8.0|^9.3|^10.4|^11.5"
"phpunit/phpunit": "^8.0|^9.3|^10.4|^11.5|^12.0"
},
"autoload": {
"psr-4": {
Expand Down
12 changes: 10 additions & 2 deletions tests/GoogleProviderIdTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Laravel\Socialite\Two\GoogleProvider;
use Laravel\Socialite\Two\User;
use Mockery as m;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\StreamInterface;
Expand All @@ -30,7 +31,10 @@ public function test_it_can_detect_jwt_tokens()

$reflection = new \ReflectionClass($provider);
$method = $reflection->getMethod('isJwtToken');
$method->setAccessible(true);

if (PHP_VERSION_ID < 80100) {
$method->setAccessible(true);
}

$this->assertTrue($method->invoke($provider, $jwtToken));
$this->assertFalse($method->invoke($provider, $accessToken));
Expand Down Expand Up @@ -99,6 +103,7 @@ public function test_it_falls_back_to_api_call_for_access_tokens()
/**
* @dataProvider invalidJwtProvider
*/
#[DataProvider('invalidJwtProvider')]
public function test_it_handles_invalid_jwt_tokens($description, $tokenOverrides, $expectedException = true)
{
$provider = $this->getProvider();
Expand Down Expand Up @@ -145,7 +150,10 @@ public function test_user_mapping_works_with_id_token_format()

$reflection = new \ReflectionClass($provider);
$method = $reflection->getMethod('mapUserToObject');
$method->setAccessible(true);

if (PHP_VERSION_ID < 80100) {
$method->setAccessible(true);
}

$user = $method->invoke($provider, $idTokenUser);

Expand Down