Skip to content

Commit 3daade7

Browse files
committed
Fix tests
1 parent 7882250 commit 3daade7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Unit/Http/Middleware/RedirectIfAuthenticatedTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function setUp()
3030
public function testAuthenticatedUserIsRedirected()
3131
{
3232
$this->authManager->shouldReceive('guard')->with(null)->once()->andReturnSelf();
33-
$this->authManager->shouldReceive('check')->with(null)->once()->andReturn(true);
33+
$this->authManager->shouldReceive('check')->withNoArgs()->once()->andReturn(true);
3434

3535
$response = $this->getMiddleware()->handle($this->request, $this->getClosureAssertions());
3636
$this->assertInstanceOf(RedirectResponse::class, $response);
@@ -43,7 +43,7 @@ public function testAuthenticatedUserIsRedirected()
4343
public function testNonAuthenticatedUserIsNotRedirected()
4444
{
4545
$this->authManager->shouldReceive('guard')->with(null)->once()->andReturnSelf();
46-
$this->authManager->shouldReceive('check')->with(null)->once()->andReturn(false);
46+
$this->authManager->shouldReceive('check')->withNoArgs()->once()->andReturn(false);
4747

4848
$this->getMiddleware()->handle($this->request, $this->getClosureAssertions());
4949
}

0 commit comments

Comments
 (0)