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
|
||||||
|
@ -111,7 +111,7 @@ class FixServiceFieldEncryption extends Command
|
|||||||
$this->error(sprintf('%s record%s could not be fixed, see log above for details.', $error, $error > 1 ? 's' : ''));
|
$this->error(sprintf('%s record%s could not be fixed, see log above for details.', $error, $error > 1 ? 's' : ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
//$this->line('Task completed');
|
// $this->line('Task completed');
|
||||||
} else {
|
} else {
|
||||||
$this->components->warn('No fix applied.');
|
$this->components->warn('No fix applied.');
|
||||||
$this->line('You can re-run this command at any time to fix inconsistent records.');
|
$this->line('You can re-run this command at any time to fix inconsistent records.');
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,7 @@ class WebauthnAttestationRequest extends AttestationRequest
|
|||||||
/**
|
/**
|
||||||
* Determine if the user is authorized to make this request.
|
* Determine if the user is authorized to make this request.
|
||||||
*/
|
*/
|
||||||
public function authorize(?WebAuthnAuthenticatable $user): bool
|
public function authorize(?WebAuthnAuthenticatable $user) : bool
|
||||||
{
|
{
|
||||||
return (bool) $user && Gate::allows('manage-webauthn-credentials');
|
return (bool) $user && Gate::allows('manage-webauthn-credentials');
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ class WebauthnAttestedRequest extends AttestedRequest
|
|||||||
/**
|
/**
|
||||||
* Determine if the user is authorized to make this request.
|
* Determine if the user is authorized to make this request.
|
||||||
*/
|
*/
|
||||||
public function authorize(?WebAuthnAuthenticatable $user): bool
|
public function authorize(?WebAuthnAuthenticatable $user) : bool
|
||||||
{
|
{
|
||||||
return (bool) $user && Gate::allows('manage-webauthn-credentials');
|
return (bool) $user && Gate::allows('manage-webauthn-credentials');
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -49,7 +49,7 @@ class ReverseProxyGuard implements Guard
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$identifier['id'] = request()->server($remoteUserHeader) ?? apache_request_headers()[$remoteUserHeader] ?? null;
|
$identifier['id'] = request()->server($remoteUserHeader) ?? apache_request_headers()[$remoteUserHeader] ?? null;
|
||||||
} catch (\Throwable $e) { //@codeCoverageIgnore
|
} catch (\Throwable $e) { // @codeCoverageIgnore
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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));
|
||||||
@ -86,7 +85,7 @@ abstract class AbstractLogoLib implements LogoLibInterface
|
|||||||
protected function strictFetch() : bool
|
protected function strictFetch() : bool
|
||||||
{
|
{
|
||||||
return Auth::user()
|
return Auth::user()
|
||||||
? (bool)Auth::user()->preferences['iconVariantStrictFetch']
|
? (bool) Auth::user()->preferences['iconVariantStrictFetch']
|
||||||
: false;
|
: false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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));
|
||||||
|
|
||||||
@ -74,8 +69,8 @@ class TfaLogoLib extends AbstractLogoLib implements LogoLibInterface
|
|||||||
*/
|
*/
|
||||||
protected function getLogo(string $serviceName)
|
protected function getLogo(string $serviceName)
|
||||||
{
|
{
|
||||||
$referenceName = $this->tfas->get($this->sanitizeServiceName(strval($serviceName)));
|
$referenceName = $this->tfas->get($this->sanitizeServiceName(strval($serviceName)));
|
||||||
$logoFilename = $referenceName . '.' . $this->format;
|
$logoFilename = $referenceName . '.' . $this->format;
|
||||||
$cachedFilename = $this->cachePrefix . $logoFilename;
|
$cachedFilename = $this->cachePrefix . $logoFilename;
|
||||||
|
|
||||||
if ($referenceName && ! Storage::disk('logos')->exists($cachedFilename)) {
|
if ($referenceName && ! Storage::disk('logos')->exists($cachedFilename)) {
|
||||||
|
@ -109,7 +109,7 @@ Route::withoutMiddleware([
|
|||||||
SetLanguage::class,
|
SetLanguage::class,
|
||||||
CustomCreateFreshApiToken::class,
|
CustomCreateFreshApiToken::class,
|
||||||
])->get('/up', function () {
|
])->get('/up', function () {
|
||||||
//Event::dispatch(new DiagnosingHealth);
|
// Event::dispatch(new DiagnosingHealth);
|
||||||
return view('health', [
|
return view('health', [
|
||||||
'isSecure' => str_starts_with(config('app.url'), 'https'),
|
'isSecure' => str_starts_with(config('app.url'), 'https'),
|
||||||
]);
|
]);
|
||||||
|
@ -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();
|
||||||
|
|
||||||
@ -400,7 +400,7 @@ class TwoFAccountControllerTest extends FeatureTestCase
|
|||||||
->assertJsonStructure(self::VALID_RESOURCE_STRUCTURE_WITHOUT_SECRET);
|
->assertJsonStructure(self::VALID_RESOURCE_STRUCTURE_WITHOUT_SECRET);
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[Test]
|
// #[Test]
|
||||||
// public function test_show_twofaccount_with_indeciphered_data_returns_replaced_data()
|
// public function test_show_twofaccount_with_indeciphered_data_returns_replaced_data()
|
||||||
// {
|
// {
|
||||||
// $dbEncryptionService = resolve('App\Services\DbEncryptionService');
|
// $dbEncryptionService = resolve('App\Services\DbEncryptionService');
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
@ -56,51 +56,51 @@ class IconFetchRequestTest extends TestCase
|
|||||||
'service' => '~string.with-sp3ci@l-ch4rs',
|
'service' => '~string.with-sp3ci@l-ch4rs',
|
||||||
]],
|
]],
|
||||||
'VALID_SELFH_ICON_COLLECTION' => [[
|
'VALID_SELFH_ICON_COLLECTION' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'selfh',
|
'iconCollection' => 'selfh',
|
||||||
]],
|
]],
|
||||||
'VALID_DASHBOARDICONS_ICON_COLLECTION' => [[
|
'VALID_DASHBOARDICONS_ICON_COLLECTION' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'dashboardicons',
|
'iconCollection' => 'dashboardicons',
|
||||||
]],
|
]],
|
||||||
'VALID_TFA_ICON_COLLECTION' => [[
|
'VALID_TFA_ICON_COLLECTION' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'tfa',
|
'iconCollection' => 'tfa',
|
||||||
]],
|
]],
|
||||||
'VALID_SELFH_ICON_COLLECTION_WITH_VALID_REGULAR_VARIANT' => [[
|
'VALID_SELFH_ICON_COLLECTION_WITH_VALID_REGULAR_VARIANT' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'selfh',
|
'iconCollection' => 'selfh',
|
||||||
'variant' => 'regular',
|
'variant' => 'regular',
|
||||||
]],
|
]],
|
||||||
'VALID_SELFH_ICON_COLLECTION_WITH_VALID_LIGHT_VARIANT' => [[
|
'VALID_SELFH_ICON_COLLECTION_WITH_VALID_LIGHT_VARIANT' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'selfh',
|
'iconCollection' => 'selfh',
|
||||||
'variant' => 'light',
|
'variant' => 'light',
|
||||||
]],
|
]],
|
||||||
'VALID_SELFH_ICON_COLLECTION_WITH_VALID_DARK_VARIANT' => [[
|
'VALID_SELFH_ICON_COLLECTION_WITH_VALID_DARK_VARIANT' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'selfh',
|
'iconCollection' => 'selfh',
|
||||||
'variant' => 'dark',
|
'variant' => 'dark',
|
||||||
]],
|
]],
|
||||||
'VALID_DASHBOARDICONS_ICON_COLLECTION_WITH_VALID_REGULAR_VARIANT' => [[
|
'VALID_DASHBOARDICONS_ICON_COLLECTION_WITH_VALID_REGULAR_VARIANT' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'dashboardicons',
|
'iconCollection' => 'dashboardicons',
|
||||||
'variant' => 'regular',
|
'variant' => 'regular',
|
||||||
]],
|
]],
|
||||||
'VALID_DASHBOARDICONS_ICON_COLLECTION_WITH_VALID_LIGHT_VARIANT' => [[
|
'VALID_DASHBOARDICONS_ICON_COLLECTION_WITH_VALID_LIGHT_VARIANT' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'dashboardicons',
|
'iconCollection' => 'dashboardicons',
|
||||||
'variant' => 'light',
|
'variant' => 'light',
|
||||||
]],
|
]],
|
||||||
'VALID_DASHBOARDICONS_ICON_COLLECTION_WITH_VALID_DARK_VARIANT' => [[
|
'VALID_DASHBOARDICONS_ICON_COLLECTION_WITH_VALID_DARK_VARIANT' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'dashboardicons',
|
'iconCollection' => 'dashboardicons',
|
||||||
'variant' => 'dark',
|
'variant' => 'dark',
|
||||||
]],
|
]],
|
||||||
'VALID_TFA_ICON_COLLECTION_WITH_VALID_REGULAR_VARIANT' => [[
|
'VALID_TFA_ICON_COLLECTION_WITH_VALID_REGULAR_VARIANT' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'tfa',
|
'iconCollection' => 'tfa',
|
||||||
'variant' => 'regular',
|
'variant' => 'regular',
|
||||||
]],
|
]],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -127,22 +127,22 @@ class IconFetchRequestTest extends TestCase
|
|||||||
'service' => null,
|
'service' => null,
|
||||||
]],
|
]],
|
||||||
'NULL_ICON_COLLECTION' => [[
|
'NULL_ICON_COLLECTION' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => null,
|
'iconCollection' => null,
|
||||||
]],
|
]],
|
||||||
'NULL_VARIANT' => [[
|
'NULL_VARIANT' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'tfa',
|
'iconCollection' => 'tfa',
|
||||||
'variant' => null,
|
'variant' => null,
|
||||||
]],
|
]],
|
||||||
'EMPTY_ICON_COLLECTION' => [[
|
'EMPTY_ICON_COLLECTION' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => '',
|
'iconCollection' => '',
|
||||||
]],
|
]],
|
||||||
'EMPTY_VARIANT' => [[
|
'EMPTY_VARIANT' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'tfa',
|
'iconCollection' => 'tfa',
|
||||||
'variant' => '',
|
'variant' => '',
|
||||||
]],
|
]],
|
||||||
'SERVICE_AS_INT' => [[
|
'SERVICE_AS_INT' => [[
|
||||||
'service' => 0,
|
'service' => 0,
|
||||||
@ -154,23 +154,23 @@ class IconFetchRequestTest extends TestCase
|
|||||||
'service' => [],
|
'service' => [],
|
||||||
]],
|
]],
|
||||||
'NOT_IN_ICON_COLLECTION_LIST' => [[
|
'NOT_IN_ICON_COLLECTION_LIST' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'string_not_in_icon_collection_list',
|
'iconCollection' => 'string_not_in_icon_collection_list',
|
||||||
]],
|
]],
|
||||||
'NOT_IN_SELFH_VARIANT_LIST' => [[
|
'NOT_IN_SELFH_VARIANT_LIST' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'selfh',
|
'iconCollection' => 'selfh',
|
||||||
'variant' => 'string_not_in_selfh_variant_list',
|
'variant' => 'string_not_in_selfh_variant_list',
|
||||||
]],
|
]],
|
||||||
'NOT_IN_DASHBOARDICONS_VARIANT_LIST' => [[
|
'NOT_IN_DASHBOARDICONS_VARIANT_LIST' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'dashboardicons',
|
'iconCollection' => 'dashboardicons',
|
||||||
'variant' => 'string_not_in_dashboardicons_variant_list',
|
'variant' => 'string_not_in_dashboardicons_variant_list',
|
||||||
]],
|
]],
|
||||||
'NOT_IN_TFA_VARIANT_LIST' => [[
|
'NOT_IN_TFA_VARIANT_LIST' => [[
|
||||||
'service' => 'validWord',
|
'service' => 'validWord',
|
||||||
'iconCollection' => 'tfa',
|
'iconCollection' => 'tfa',
|
||||||
'variant' => 'string_not_in_tfa_variant_list',
|
'variant' => 'string_not_in_tfa_variant_list',
|
||||||
]],
|
]],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ class SocialiteControllerTest extends FeatureTestCase
|
|||||||
#[Test]
|
#[Test]
|
||||||
public function test_redirect_returns_error_when_sso_provider_client_id_is_missing()
|
public function test_redirect_returns_error_when_sso_provider_client_id_is_missing()
|
||||||
{
|
{
|
||||||
//Settings::set('enableSso', true);
|
// Settings::set('enableSso', true);
|
||||||
config(['services.github.client_id' => null], true);
|
config(['services.github.client_id' => null], true);
|
||||||
|
|
||||||
$response = $this->get('/socialite/redirect/github');
|
$response = $this->get('/socialite/redirect/github');
|
||||||
|
@ -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();
|
||||||
|
|
||||||
@ -160,14 +160,14 @@ class LogoLibsTest extends FeatureTestCase
|
|||||||
#[Test]
|
#[Test]
|
||||||
public function test_getIcon_fallbacks_to_user_preferences_when_variant_is_omitted()
|
public function test_getIcon_fallbacks_to_user_preferences_when_variant_is_omitted()
|
||||||
{
|
{
|
||||||
$user = User::factory()->create();
|
$user = User::factory()->create();
|
||||||
$user['preferences->iconVariant'] = 'dark';
|
$user['preferences->iconVariant'] = 'dark';
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
Http::preventStrayRequests();
|
Http::preventStrayRequests();
|
||||||
Http::fake([
|
Http::fake([
|
||||||
CommonDataProvider::SELFH_URL_ROOT . 'svg/myservice.svg' => Http::response(HttpRequestTestData::SVG_LOGO_BODY_VARIANT_REGULAR, 200),
|
CommonDataProvider::SELFH_URL_ROOT . 'svg/myservice.svg' => Http::response(HttpRequestTestData::SVG_LOGO_BODY_VARIANT_REGULAR, 200),
|
||||||
CommonDataProvider::SELFH_URL_ROOT . 'svg/myservice-dark.svg' => Http::response(HttpRequestTestData::SVG_LOGO_BODY_VARIANT_DARK, 200),
|
CommonDataProvider::SELFH_URL_ROOT . 'svg/myservice-dark.svg' => Http::response(HttpRequestTestData::SVG_LOGO_BODY_VARIANT_DARK, 200),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->logoLib = $this->app->make(SelfhLogoLib::class);
|
$this->logoLib = $this->app->make(SelfhLogoLib::class);
|
||||||
@ -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