mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-25 06:24:07 +02:00
Fix pint issues
This commit is contained in:
parent
afaaa08897
commit
243a44d516
@ -31,7 +31,7 @@ class IconFetchRequest extends FormRequest
|
|||||||
'sometimes',
|
'sometimes',
|
||||||
'required',
|
'required',
|
||||||
'string',
|
'string',
|
||||||
]
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($this->input('iconCollection', null) === 'selfh') {
|
if ($this->input('iconCollection', null) === 'selfh') {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
* Copyright (c) 2023 Bubka
|
* Copyright (c) 2023 Bubka
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\Auth;
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
use Laravel\Passport\Http\Controllers\PersonalAccessTokenController as PassportPatController;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
|
use Laravel\Passport\Http\Controllers\PersonalAccessTokenController as PassportPatController;
|
||||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||||
|
|
||||||
class PersonalAccessTokenController extends PassportPatController
|
class PersonalAccessTokenController extends PassportPatController
|
||||||
@ -12,7 +12,6 @@ class PersonalAccessTokenController extends PassportPatController
|
|||||||
/**
|
/**
|
||||||
* Get all of the personal access tokens for the authenticated user.
|
* Get all of the personal access tokens for the authenticated user.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @return \Illuminate\Database\Eloquent\Collection<int, \Laravel\Passport\Token>|\Illuminate\Http\JsonResponse
|
* @return \Illuminate\Database\Eloquent\Collection<int, \Laravel\Passport\Token>|\Illuminate\Http\JsonResponse
|
||||||
*/
|
*/
|
||||||
public function forUser(Request $request)
|
public function forUser(Request $request)
|
||||||
@ -27,7 +26,6 @@ class PersonalAccessTokenController extends PassportPatController
|
|||||||
/**
|
/**
|
||||||
* Create a new personal access token for the user.
|
* Create a new personal access token for the user.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @return \Laravel\Passport\PersonalAccessTokenResult|\Illuminate\Http\JsonResponse
|
* @return \Laravel\Passport\PersonalAccessTokenResult|\Illuminate\Http\JsonResponse
|
||||||
*/
|
*/
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
@ -42,7 +40,6 @@ class PersonalAccessTokenController extends PassportPatController
|
|||||||
/**
|
/**
|
||||||
* Delete the given token.
|
* Delete the given token.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @param string $tokenId
|
* @param string $tokenId
|
||||||
* @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
|
||||||
*/
|
*/
|
||||||
@ -54,6 +51,4 @@ class PersonalAccessTokenController extends PassportPatController
|
|||||||
|
|
||||||
return parent::destroy($request, $tokenId);
|
return parent::destroy($request, $tokenId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Http\Middleware;
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
use Laravel\Passport\Http\Middleware\CreateFreshApiToken as CreateFreshApiToken;
|
use Laravel\Passport\Http\Middleware\CreateFreshApiToken;
|
||||||
|
|
||||||
class CustomCreateFreshApiToken extends CreateFreshApiToken
|
class CustomCreateFreshApiToken extends CreateFreshApiToken
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace App\Providers\Socialite;
|
namespace App\Providers\Socialite;
|
||||||
|
|
||||||
use GuzzleHttp\RequestOptions;
|
use GuzzleHttp\RequestOptions;
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Laravel\Socialite\Two\ProviderInterface;
|
use Laravel\Socialite\Two\ProviderInterface;
|
||||||
use SocialiteProviders\Manager\OAuth2\AbstractProvider;
|
use SocialiteProviders\Manager\OAuth2\AbstractProvider;
|
||||||
use SocialiteProviders\Manager\OAuth2\User;
|
use SocialiteProviders\Manager\OAuth2\User;
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace App\Services\LogoLib;
|
namespace App\Services\LogoLib;
|
||||||
|
|
||||||
use App\Facades\IconStore;
|
use App\Facades\IconStore;
|
||||||
use App\Services\LogoLib\LogoLibInterface;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
@ -38,7 +37,7 @@ abstract class AbstractLogoLib implements LogoLibInterface
|
|||||||
* @param string|null $variant The theme variant to fetch (light, dark, etc...)
|
* @param string|null $variant The theme variant to fetch (light, dark, etc...)
|
||||||
* @return string|null The icon filename or null if no logo has been found
|
* @return string|null The icon filename or null if no logo has been found
|
||||||
*/
|
*/
|
||||||
public function getIcon(?string $serviceName, string $variant = null) : string|null
|
public function getIcon(?string $serviceName, ?string $variant = null) : ?string
|
||||||
{
|
{
|
||||||
$this->setVariant($variant);
|
$this->setVariant($variant);
|
||||||
$logoFilename = $this->getLogo(strval($serviceName));
|
$logoFilename = $this->getLogo(strval($serviceName));
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Services\LogoLib;
|
namespace App\Services\LogoLib;
|
||||||
|
|
||||||
use App\Services\LogoLib\AbstractLogoLib;
|
|
||||||
use App\Services\LogoLib\LogoLibInterface;
|
|
||||||
|
|
||||||
class DashboardiconsLogoLib extends AbstractLogoLib implements LogoLibInterface
|
class DashboardiconsLogoLib extends AbstractLogoLib implements LogoLibInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -16,5 +13,4 @@ class DashboardiconsLogoLib extends AbstractLogoLib implements LogoLibInterface
|
|||||||
* Base url of the icon collection
|
* Base url of the icon collection
|
||||||
*/
|
*/
|
||||||
protected string $libUrl = 'https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/';
|
protected string $libUrl = 'https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,5 +4,5 @@ namespace App\Services\LogoLib;
|
|||||||
|
|
||||||
interface LogoLibInterface
|
interface LogoLibInterface
|
||||||
{
|
{
|
||||||
public function getIcon(?string $serviceName, string $variant = null): string|null;
|
public function getIcon(?string $serviceName, ?string $variant = null) : ?string;
|
||||||
}
|
}
|
@ -13,16 +13,16 @@ class LogoLibManager extends Manager
|
|||||||
|
|
||||||
public function createTfaDriver() : TfaLogoLib
|
public function createTfaDriver() : TfaLogoLib
|
||||||
{
|
{
|
||||||
return new TfaLogoLib();
|
return new TfaLogoLib;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createSelfhDriver() : SelfhLogoLib
|
public function createSelfhDriver() : SelfhLogoLib
|
||||||
{
|
{
|
||||||
return new SelfhLogoLib();
|
return new SelfhLogoLib;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createDashboardiconsDriver() : DashboardiconsLogoLib
|
public function createDashboardiconsDriver() : DashboardiconsLogoLib
|
||||||
{
|
{
|
||||||
return new DashboardiconsLogoLib();
|
return new DashboardiconsLogoLib;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Services\LogoLib;
|
namespace App\Services\LogoLib;
|
||||||
|
|
||||||
use App\Services\LogoLib\AbstractLogoLib;
|
|
||||||
use App\Services\LogoLib\LogoLibInterface;
|
|
||||||
|
|
||||||
class SelfhLogoLib extends AbstractLogoLib implements LogoLibInterface
|
class SelfhLogoLib extends AbstractLogoLib implements LogoLibInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Services\LogoLib;
|
namespace App\Services\LogoLib;
|
||||||
|
|
||||||
use App\Services\LogoLib\AbstractLogoLib;
|
|
||||||
use App\Services\LogoLib\LogoLibInterface;
|
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
@ -26,9 +24,6 @@ class TfaLogoLib extends AbstractLogoLib implements LogoLibInterface
|
|||||||
*/
|
*/
|
||||||
const TFA_JSON_URL = 'https://2fa.directory/api/v3/tfa.json';
|
const TFA_JSON_URL = 'https://2fa.directory/api/v3/tfa.json';
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected string $libUrl = 'https://raw.githubusercontent.com/2factorauth/twofactorauth/master/img/';
|
protected string $libUrl = 'https://raw.githubusercontent.com/2factorauth/twofactorauth/master/img/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,7 +40,7 @@ class TfaLogoLib extends AbstractLogoLib implements LogoLibInterface
|
|||||||
* @param string|null $serviceName Name of the service to fetch a logo for
|
* @param string|null $serviceName Name of the service to fetch a logo for
|
||||||
* @return string|null The icon filename or null if no logo has been found
|
* @return string|null The icon filename or null if no logo has been found
|
||||||
*/
|
*/
|
||||||
public function getIcon(?string $serviceName, string $variant = null) : string|null
|
public function getIcon(?string $serviceName, ?string $variant = null) : ?string
|
||||||
{
|
{
|
||||||
$logoFilename = $this->getLogo(strval($serviceName));
|
$logoFilename = $this->getLogo(strval($serviceName));
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ class UserControllerTest extends FeatureTestCase
|
|||||||
'locked',
|
'locked',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ class GroupControllerTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const NEW_GROUP_NAME = 'MyNewGroup';
|
private const NEW_GROUP_NAME = 'MyNewGroup';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ class IconControllerTest extends FeatureTestCase
|
|||||||
*/
|
*/
|
||||||
protected $user;
|
protected $user;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class QrCodeControllerTest extends FeatureTestCase
|
|||||||
*/
|
*/
|
||||||
protected $twofaccount;
|
protected $twofaccount;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class SettingControllerTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const USER_DEFINED_SETTING_CHANGED_VALUE = 'mySetting';
|
private const USER_DEFINED_SETTING_CHANGED_VALUE = 'mySetting';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ class TwoFAccountControllerTest extends FeatureTestCase
|
|||||||
'secret' => OtpTestData::SECRET,
|
'secret' => OtpTestData::SECRET,
|
||||||
];
|
];
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ class UserManagerControllerTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const PASSWORD = 'password';
|
private const PASSWORD = 'password';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ class GroupStoreRequestTest extends FeatureTestCase
|
|||||||
|
|
||||||
const UNIQUE_GROUP_NAME = 'MyGroup';
|
const UNIQUE_GROUP_NAME = 'MyGroup';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -11,9 +11,13 @@ use App\Services\LogoLib\TfaLogoLib;
|
|||||||
final class CommonDataProvider
|
final class CommonDataProvider
|
||||||
{
|
{
|
||||||
const TFA_URL = 'https://raw.githubusercontent.com/2factorauth/twofactorauth/master/img/*';
|
const TFA_URL = 'https://raw.githubusercontent.com/2factorauth/twofactorauth/master/img/*';
|
||||||
|
|
||||||
const SELFH_URL_ROOT = 'https://cdn.jsdelivr.net/gh/selfhst/icons/';
|
const SELFH_URL_ROOT = 'https://cdn.jsdelivr.net/gh/selfhst/icons/';
|
||||||
|
|
||||||
const SELFH_URL = self::SELFH_URL_ROOT . '*';
|
const SELFH_URL = self::SELFH_URL_ROOT . '*';
|
||||||
|
|
||||||
const DASHBOARDICONS_URL_ROOT = 'https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/';
|
const DASHBOARDICONS_URL_ROOT = 'https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/';
|
||||||
|
|
||||||
const DASHBOARDICONS_URL = self::DASHBOARDICONS_URL_ROOT . '*';
|
const DASHBOARDICONS_URL = self::DASHBOARDICONS_URL_ROOT . '*';
|
||||||
|
|
||||||
public static function iconsCollectionProvider() : array
|
public static function iconsCollectionProvider() : array
|
||||||
@ -34,5 +38,4 @@ final class CommonDataProvider
|
|||||||
]],
|
]],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ class FixServiceFieldEncryptionTest extends FeatureTestCase
|
|||||||
*/
|
*/
|
||||||
protected $command = '2fauth:fix-service-encryption';
|
protected $command = '2fauth:fix-service-encryption';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ class PurgeLogTest extends FeatureTestCase
|
|||||||
*/
|
*/
|
||||||
protected $user;
|
protected $user;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
@ -24,14 +24,14 @@ class PurgeLogTest extends FeatureTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Test]
|
#[Test]
|
||||||
public function test_purgeLog_completes()
|
public function test_purge_log_completes()
|
||||||
{
|
{
|
||||||
$this->artisan('2fauth:purge-log')
|
$this->artisan('2fauth:purge-log')
|
||||||
->assertSuccessful();
|
->assertSuccessful();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Test]
|
#[Test]
|
||||||
public function test_purgeLog_defaults_to_one_year()
|
public function test_purge_log_defaults_to_one_year()
|
||||||
{
|
{
|
||||||
$oneYearOldLog = AuthLog::factory()->daysAgo(366)->for($this->user, 'authenticatable')->create();
|
$oneYearOldLog = AuthLog::factory()->daysAgo(366)->for($this->user, 'authenticatable')->create();
|
||||||
$sixMonthsOldLog = AuthLog::factory()->daysAgo(364)->for($this->user, 'authenticatable')->create();
|
$sixMonthsOldLog = AuthLog::factory()->daysAgo(364)->for($this->user, 'authenticatable')->create();
|
||||||
|
@ -69,7 +69,7 @@ class LoginTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const USER_EMAIL = 'john@example.com';
|
private const USER_EMAIL = 'john@example.com';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class PasswordControllerTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const REVERSE_PROXY_GUARD = 'reverse-proxy-guard';
|
private const REVERSE_PROXY_GUARD = 'reverse-proxy-guard';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class RegisterControllerTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const EMAIL_FILTERING_RULE = '^[A-Za-z0-9._%+-]+@example\.org';
|
private const EMAIL_FILTERING_RULE = '^[A-Za-z0-9._%+-]+@example\.org';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ class SocialiteControllerTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const USER_EMAIL = 'john@provider.com';
|
private const USER_EMAIL = 'john@provider.com';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class UserControllerTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const PASSWORD = 'password';
|
private const PASSWORD = 'password';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class WebAuthnDeviceLostControllerTest extends FeatureTestCase
|
|||||||
*/
|
*/
|
||||||
protected $user;
|
protected $user;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ class WebAuthnDeviceLostControllerTest extends FeatureTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Test]
|
#[Test]
|
||||||
public function test_sendRecoveryEmail_sends_notification_on_success()
|
public function test_send_recovery_email_sends_notification_on_success()
|
||||||
{
|
{
|
||||||
Notification::fake();
|
Notification::fake();
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ class WebAuthnLoginControllerTest extends FeatureTestCase
|
|||||||
|
|
||||||
const ASSERTION_CHALLENGE = 'iXozmynKi+YD2iRvKNbSPA==';
|
const ASSERTION_CHALLENGE = 'iXozmynKi+YD2iRvKNbSPA==';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class WebAuthnManageControllerTest extends FeatureTestCase
|
|||||||
|
|
||||||
public const CREDENTIAL_ID_RAW = '+VOLFKPY+/FuMI/sJ7gMllK76L3VoRUINj6lL/Z3qDg=';
|
public const CREDENTIAL_ID_RAW = '+VOLFKPY+/FuMI/sJ7gMllK76L3VoRUINj6lL/Z3qDg=';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class WebAuthnRecoveryControllerTest extends FeatureTestCase
|
|||||||
|
|
||||||
const CREDENTIAL_ID = '-VOLFKPY-_FuMI_sJ7gMllK76L3VoRUINj6lL_Z3qDg';
|
const CREDENTIAL_ID = '-VOLFKPY-_FuMI_sJ7gMllK76L3VoRUINj6lL_Z3qDg';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ class WebAuthnRegisterControllerTest extends FeatureTestCase
|
|||||||
*/
|
*/
|
||||||
protected $user;
|
protected $user;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ class WebAuthnRegisterControllerTest extends FeatureTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[Test]
|
#[Test]
|
||||||
public function test_uses_attestation_with_fastRegistration_request() : void
|
public function test_uses_attestation_with_fast_registration_request() : void
|
||||||
{
|
{
|
||||||
Config::set('webauthn.user_verification', UserVerification::DISCOURAGED);
|
Config::set('webauthn.user_verification', UserVerification::DISCOURAGED);
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class RejectIfSsoOnlyAndNotForAdminMiddlewareTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const PASSWORD = 'password';
|
private const PASSWORD = 'password';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class SystemControllerTest extends FeatureTestCase
|
|||||||
|
|
||||||
protected $admin;
|
protected $admin;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class TwoFAccountModelTest extends FeatureTestCase
|
|||||||
*/
|
*/
|
||||||
protected $helpers;
|
protected $helpers;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ class FailedLoginNotificationTest extends FeatureTestCase
|
|||||||
*/
|
*/
|
||||||
protected $failedLogin;
|
protected $failedLogin;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ class SignedInWithNewDeviceNotificationTest extends FeatureTestCase
|
|||||||
*/
|
*/
|
||||||
protected $signedInWithNewDevice;
|
protected $signedInWithNewDevice;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class TestEmailSettingNotificationTest extends FeatureTestCase
|
|||||||
*/
|
*/
|
||||||
protected $testEmailSettingNotification;
|
protected $testEmailSettingNotification;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class WebauthnRecoveryNotificationTest extends FeatureTestCase
|
|||||||
*/
|
*/
|
||||||
protected $webauthnRecoveryNotification;
|
protected $webauthnRecoveryNotification;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ class ManagePatPermissionsTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const PASSWORD = 'password';
|
private const PASSWORD = 'password';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class ManageWebauthnPermissionsTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const PASSWORD = 'password';
|
private const PASSWORD = 'password';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ class GroupServiceTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const NEW_GROUP_NAME = 'MyNewGroup';
|
private const NEW_GROUP_NAME = 'MyNewGroup';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class IconServiceTest extends FeatureTestCase
|
|||||||
|
|
||||||
protected IconService $iconService;
|
protected IconService $iconService;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ class IconStoreServiceTest extends FeatureTestCase
|
|||||||
*/
|
*/
|
||||||
protected IconStoreService $iconStore;
|
protected IconStoreService $iconStore;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ class LogoLibsTest extends FeatureTestCase
|
|||||||
|
|
||||||
protected LogoLibInterface $logoLib;
|
protected LogoLibInterface $logoLib;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
@ -198,13 +198,13 @@ class LogoLibsTest extends FeatureTestCase
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'INVALID_VARIANT' => [
|
'INVALID_VARIANT' => [
|
||||||
'not_a_valid_variant'
|
'not_a_valid_variant',
|
||||||
],
|
],
|
||||||
'NULL_VARIANT' => [
|
'NULL_VARIANT' => [
|
||||||
null
|
null,
|
||||||
],
|
],
|
||||||
'EMPTY_VARIANT' => [
|
'EMPTY_VARIANT' => [
|
||||||
''
|
'',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ class QrCodeServiceTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const DECODED_IMAGE = 'otpauth://totp/test@test.com?secret=A4GRFHVIRBGY7UIW';
|
private const DECODED_IMAGE = 'otpauth://totp/test@test.com?secret=A4GRFHVIRBGY7UIW';
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ class ReleaseRadarServiceTest extends FeatureTestCase
|
|||||||
{
|
{
|
||||||
use WithoutMiddleware;
|
use WithoutMiddleware;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ class SettingServiceTest extends FeatureTestCase
|
|||||||
|
|
||||||
private const TOTP_FULL_CUSTOM_URI = 'otpauth://totp/' . self::SERVICE . ':' . self::ACCOUNT . '?secret=' . self::SECRET . '&issuer=' . self::SERVICE . '&digits=' . self::DIGITS_CUSTOM . '&period=' . self::PERIOD_CUSTOM . '&algorithm=' . self::ALGORITHM_CUSTOM . '&image=' . OtpTestData::EXTERNAL_IMAGE_URL_ENCODED;
|
private const TOTP_FULL_CUSTOM_URI = 'otpauth://totp/' . self::SERVICE . ':' . self::ACCOUNT . '?secret=' . self::SECRET . '&issuer=' . self::SERVICE . '&digits=' . self::DIGITS_CUSTOM . '&period=' . self::PERIOD_CUSTOM . '&algorithm=' . self::ALGORITHM_CUSTOM . '&image=' . OtpTestData::EXTERNAL_IMAGE_URL_ENCODED;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ class TwoFAccountServiceTest extends FeatureTestCase
|
|||||||
|
|
||||||
protected $userGroupB;
|
protected $userGroupB;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ use Tests\FeatureTestCase;
|
|||||||
#[CoversClass(SinglePageController::class)]
|
#[CoversClass(SinglePageController::class)]
|
||||||
class ViewTest extends FeatureTestCase
|
class ViewTest extends FeatureTestCase
|
||||||
{
|
{
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ class GroupControllerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
protected $user;
|
protected $user;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ class MigratorTest extends TestCase
|
|||||||
|
|
||||||
protected $fakeTwofaccount;
|
protected $fakeTwofaccount;
|
||||||
|
|
||||||
public function setUp() : void
|
protected function setUp() : void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user