forked from mirror/Part-DB.Part-DB-server
Fixed some inspection issues.
This commit is contained in:
parent
6caf605fe2
commit
e01b06fb85
80 changed files with 173 additions and 218 deletions
|
@ -68,7 +68,7 @@ class RedirectControllerTest extends WebTestCase
|
|||
$this->userRepo = $this->em->getRepository(User::class);
|
||||
}
|
||||
|
||||
public function urlMatchDataProvider()
|
||||
public function urlMatchDataProvider(): array
|
||||
{
|
||||
return [
|
||||
['/', true],
|
||||
|
@ -99,7 +99,7 @@ class RedirectControllerTest extends WebTestCase
|
|||
$this->assertSame($expect_redirect, $response->isRedirect());
|
||||
}
|
||||
|
||||
public function urlAddLocaleDataProvider()
|
||||
public function urlAddLocaleDataProvider(): array
|
||||
{
|
||||
return [
|
||||
//User locale, original target, redirect target
|
||||
|
|
|
@ -57,11 +57,11 @@ class PasswordChangeNeededSubscriberTest extends TestCase
|
|||
|
||||
//A user without a group must not redirect
|
||||
$user->setGroup(null);
|
||||
$this->assertFalse(\App\EventSubscriber\UserSystem\PasswordChangeNeededSubscriber::TFARedirectNeeded($user));
|
||||
$this->assertFalse(PasswordChangeNeededSubscriber::TFARedirectNeeded($user));
|
||||
|
||||
//When the group does not enforce the redirect the user must not be redirected
|
||||
$user->setGroup($group);
|
||||
$this->assertFalse(\App\EventSubscriber\UserSystem\PasswordChangeNeededSubscriber::TFARedirectNeeded($user));
|
||||
$this->assertFalse(PasswordChangeNeededSubscriber::TFARedirectNeeded($user));
|
||||
|
||||
//The user must be redirected if the group enforces 2FA and it does not have a method
|
||||
$group->setEnforce2FA(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue