Skip to content

Commit 4caba8b

Browse files
authored
Fix api guard tests (#38402)
1 parent 1316c26 commit 4caba8b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/Integration/Auth/ApiAuthenticationWithEloquentTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ protected function getEnvironmentSetUp($app)
2121
$app['config']->set('auth.defaults.guard', 'api');
2222
$app['config']->set('auth.providers.users.model', User::class);
2323

24+
$app['config']->set('auth.guards.api', [
25+
'driver' => 'token',
26+
'provider' => 'users',
27+
'hash' => false,
28+
]);
29+
2430
// Database configuration
2531
$app['config']->set('database.default', 'testbench');
2632

tests/Integration/Foundation/Testing/Concerns/InteractsWithAuthenticationTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ protected function getEnvironmentSetUp($app)
1616
{
1717
$app['config']->set('auth.providers.users.model', AuthenticationTestUser::class);
1818

19+
$app['config']->set('auth.guards.api', [
20+
'driver' => 'token',
21+
'provider' => 'users',
22+
'hash' => false,
23+
]);
24+
1925
$app['config']->set('database.default', 'testbench');
2026
$app['config']->set('database.connections.testbench', [
2127
'driver' => 'sqlite',

0 commit comments

Comments
 (0)