Skip to content

Commit

Permalink
Fix PHPStan warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Mar 23, 2024
1 parent db38505 commit 39bc3dd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/tests/Authenticate/AuthenticatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ public function testLoginWithRememberMeForAuthCompromisedException(): void
->shouldReceive('hasPossibleManipulation')->once()->andReturn(true)
->getMock();
$storageInterface = $this->ci->get(StorageInterface::class);
$rememberMe = Mockery::mock(RememberMe::class . '[login]', [$storageInterface])
/** @var class-string */
$class = RememberMe::class . '[login]';
$rememberMe = Mockery::mock($class, [$storageInterface])
->shouldReceive('login')->once()->andReturn($loginResult)
->getMock();
$this->ci->set(RememberMe::class, $rememberMe);
Expand Down Expand Up @@ -461,7 +463,9 @@ public function testLoginSessionUserWithAuthExpired(): void
->makePartial()
->shouldReceive('getValue')->andReturn('foo')
->getMock();
$rememberMe = Mockery::mock(RememberMe::class . '[getCookie]', [$storageInterface])
/** @var class-string */
$class = RememberMe::class . '[getCookie]';
$rememberMe = Mockery::mock($class, [$storageInterface])
->shouldReceive('getCookie')->andReturn($cookie)
->getMock();
$this->ci->set(RememberMe::class, $rememberMe);
Expand Down

0 comments on commit 39bc3dd

Please sign in to comment.