Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 32a6bef

Browse files
committed
Updated example test case for v6.0
1 parent 6d931e8 commit 32a6bef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/auth/testing.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ class AuthTest extends TestCase
5050
'userprincipalname' => ['[email protected]'],
5151
]);
5252

53-
Resolver::shouldReceive('byCredentials')->once()->andReturn($user)
53+
Resolver::shouldReceive('byCredentials')->once()->with($credentials)->andReturn($user)
54+
->shouldReceive('getDatabaseIdColumn')->twice()->andReturn('objectguid')
55+
->shouldReceive('getDatabaseUsernameColumn')->once()->andReturn('email')
56+
->shouldReceive('getLdapDiscoveryAttribute')->once()->andReturn('userprincipalname')
5457
->shouldReceive('authenticate')->once()->andReturn(true);
5558

5659
$this->post(route('login'), $credentials)->assertRedirect('/dashboard');

0 commit comments

Comments
 (0)