Skip to content

Commit

Permalink
Fix api guard tests (#38402)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Aug 16, 2021
1 parent 1316c26 commit 4caba8b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/Integration/Auth/ApiAuthenticationWithEloquentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ protected function getEnvironmentSetUp($app)
$app['config']->set('auth.defaults.guard', 'api');
$app['config']->set('auth.providers.users.model', User::class);

$app['config']->set('auth.guards.api', [
'driver' => 'token',
'provider' => 'users',
'hash' => false,
]);

// Database configuration
$app['config']->set('database.default', 'testbench');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ protected function getEnvironmentSetUp($app)
{
$app['config']->set('auth.providers.users.model', AuthenticationTestUser::class);

$app['config']->set('auth.guards.api', [
'driver' => 'token',
'provider' => 'users',
'hash' => false,
]);

$app['config']->set('database.default', 'testbench');
$app['config']->set('database.connections.testbench', [
'driver' => 'sqlite',
Expand Down

0 comments on commit 4caba8b

Please sign in to comment.