Skip to content

Commit 7a24f63

Browse files
committed
Update tests
1 parent 9eb38df commit 7a24f63

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/Unit/Auth/GuardTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,29 @@
77
use Auth0\Laravel\Exception\AuthenticationException;
88
use Auth0\Laravel\Entities\Credential;
99
use Auth0\Laravel\Model\Stateful\User;
10+
use Auth0\SDK\Configuration\SdkConfiguration;
1011
use Illuminate\Support\Facades\Route;
1112

1213
uses()->group('auth', 'auth.guard', 'auth.guard.shared');
1314

1415
beforeEach(function (): void {
16+
$this->secret = uniqid();
17+
18+
config([
19+
'auth0.strategy' => SdkConfiguration::STRATEGY_REGULAR,
20+
'auth0.domain' => uniqid() . '.auth0.com',
21+
'auth0.clientId' => uniqid(),
22+
'auth0.clientSecret' => $this->secret,
23+
'auth0.cookieSecret' => uniqid(),
24+
'auth0.routes.home' => '/' . uniqid(),
25+
]);
26+
27+
$this->laravel = app('auth0');
1528
$this->guard = auth('testGuard');
29+
$this->sdk = $this->laravel->getSdk();
30+
$this->config = $this->sdk->configuration();
31+
$this->session = $this->config->getSessionStorage();
32+
1633
$this->user = new User(['sub' => uniqid('auth0|')]);
1734

1835
Route::middleware('auth:auth0')->get('/test', function () {

0 commit comments

Comments
 (0)