mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-24 14:02:09 +02:00
Fix pint issues
This commit is contained in:
parent
afaaa08897
commit
243a44d516
@ -62,7 +62,7 @@ class IconController extends Controller
|
||||
: 'regular';
|
||||
|
||||
$icon = LogoLib::driver($iconCollection)->getIcon($validated['service'], $variant);
|
||||
|
||||
|
||||
return $icon
|
||||
? response()->json(['filename' => $icon], 201)
|
||||
: response()->json(null, 204);
|
||||
|
@ -31,7 +31,7 @@ class IconFetchRequest extends FormRequest
|
||||
'sometimes',
|
||||
'required',
|
||||
'string',
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
if ($this->input('iconCollection', null) === 'selfh') {
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* The MIT License (MIT)
|
||||
* 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->line('Task completed');
|
||||
// $this->line('Task completed');
|
||||
} else {
|
||||
$this->components->warn('No fix applied.');
|
||||
$this->line('You can re-run this command at any time to fix inconsistent records.');
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use Laravel\Passport\Http\Controllers\PersonalAccessTokenController as PassportPatController;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Laravel\Passport\Http\Controllers\PersonalAccessTokenController as PassportPatController;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
|
||||
class PersonalAccessTokenController extends PassportPatController
|
||||
@ -12,7 +12,6 @@ class PersonalAccessTokenController extends PassportPatController
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public function forUser(Request $request)
|
||||
@ -20,14 +19,13 @@ class PersonalAccessTokenController extends PassportPatController
|
||||
if (Gate::denies('manage-pat')) {
|
||||
throw new AccessDeniedHttpException(__('errors.unsupported_with_sso_only'));
|
||||
}
|
||||
|
||||
|
||||
return parent::forUser($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new personal access token for the user.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Laravel\Passport\PersonalAccessTokenResult|\Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function store(Request $request)
|
||||
@ -42,7 +40,6 @@ class PersonalAccessTokenController extends PassportPatController
|
||||
/**
|
||||
* Delete the given token.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param string $tokenId
|
||||
* @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
|
||||
*/
|
||||
@ -54,6 +51,4 @@ class PersonalAccessTokenController extends PassportPatController
|
||||
|
||||
return parent::destroy($request, $tokenId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ class WebAuthnManageController extends Controller
|
||||
if (Gate::denies('manage-webauthn-credentials')) {
|
||||
throw new AccessDeniedHttpException(__('errors.unsupported_with_sso_only'));
|
||||
}
|
||||
|
||||
|
||||
$allUserCredentials = $request->user()->webAuthnCredentials()->WhereEnabled()->get();
|
||||
|
||||
return response()->json($allUserCredentials, 200);
|
||||
@ -52,7 +52,7 @@ class WebAuthnManageController extends Controller
|
||||
public function delete(Request $request, $credential)
|
||||
{
|
||||
Log::info('Deletion of security device requested');
|
||||
|
||||
|
||||
if (Gate::denies('manage-webauthn-credentials')) {
|
||||
throw new AccessDeniedHttpException(__('errors.unsupported_with_sso_only'));
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Laravel\Passport\Http\Middleware\CreateFreshApiToken as CreateFreshApiToken;
|
||||
use Laravel\Passport\Http\Middleware\CreateFreshApiToken;
|
||||
|
||||
class CustomCreateFreshApiToken extends CreateFreshApiToken
|
||||
{
|
||||
|
@ -20,11 +20,11 @@ class WebauthnAttestationRequest extends AttestationRequest
|
||||
{
|
||||
throw new AccessDeniedHttpException(__('errors.unsupported_with_sso_only'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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');
|
||||
}
|
||||
|
@ -20,11 +20,11 @@ class WebauthnAttestedRequest extends AttestedRequest
|
||||
{
|
||||
throw new AccessDeniedHttpException(__('errors.unsupported_with_sso_only'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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');
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace App\Providers\Socialite;
|
||||
|
||||
use GuzzleHttp\RequestOptions;
|
||||
use Illuminate\Http\Request;
|
||||
use Laravel\Socialite\Two\ProviderInterface;
|
||||
use SocialiteProviders\Manager\OAuth2\AbstractProvider;
|
||||
use SocialiteProviders\Manager\OAuth2\User;
|
||||
|
@ -49,7 +49,7 @@ class ReverseProxyGuard implements Guard
|
||||
|
||||
try {
|
||||
$identifier['id'] = request()->server($remoteUserHeader) ?? apache_request_headers()[$remoteUserHeader] ?? null;
|
||||
} catch (\Throwable $e) { //@codeCoverageIgnore
|
||||
} catch (\Throwable $e) { // @codeCoverageIgnore
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
namespace App\Services\LogoLib;
|
||||
|
||||
use App\Facades\IconStore;
|
||||
use App\Services\LogoLib\LogoLibInterface;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
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...)
|
||||
* @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);
|
||||
$logoFilename = $this->getLogo(strval($serviceName));
|
||||
@ -86,7 +85,7 @@ abstract class AbstractLogoLib implements LogoLibInterface
|
||||
protected function strictFetch() : bool
|
||||
{
|
||||
return Auth::user()
|
||||
? (bool)Auth::user()->preferences['iconVariantStrictFetch']
|
||||
? (bool) Auth::user()->preferences['iconVariantStrictFetch']
|
||||
: false;
|
||||
}
|
||||
|
||||
@ -122,7 +121,7 @@ abstract class AbstractLogoLib implements LogoLibInterface
|
||||
case 'dark':
|
||||
$suffix = '-dark';
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
$suffix = '';
|
||||
break;
|
||||
|
@ -2,9 +2,6 @@
|
||||
|
||||
namespace App\Services\LogoLib;
|
||||
|
||||
use App\Services\LogoLib\AbstractLogoLib;
|
||||
use App\Services\LogoLib\LogoLibInterface;
|
||||
|
||||
class DashboardiconsLogoLib extends AbstractLogoLib implements LogoLibInterface
|
||||
{
|
||||
/**
|
||||
@ -16,5 +13,4 @@ class DashboardiconsLogoLib extends AbstractLogoLib implements LogoLibInterface
|
||||
* Base url of the icon collection
|
||||
*/
|
||||
protected string $libUrl = 'https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/';
|
||||
|
||||
}
|
||||
|
@ -4,5 +4,5 @@ namespace App\Services\LogoLib;
|
||||
|
||||
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
|
||||
{
|
||||
return new TfaLogoLib();
|
||||
return new TfaLogoLib;
|
||||
}
|
||||
|
||||
public function createSelfhDriver() : SelfhLogoLib
|
||||
{
|
||||
return new SelfhLogoLib();
|
||||
return new SelfhLogoLib;
|
||||
}
|
||||
|
||||
public function createDashboardiconsDriver() : DashboardiconsLogoLib
|
||||
{
|
||||
return new DashboardiconsLogoLib();
|
||||
return new DashboardiconsLogoLib;
|
||||
}
|
||||
}
|
||||
|
@ -2,9 +2,6 @@
|
||||
|
||||
namespace App\Services\LogoLib;
|
||||
|
||||
use App\Services\LogoLib\AbstractLogoLib;
|
||||
use App\Services\LogoLib\LogoLibInterface;
|
||||
|
||||
class SelfhLogoLib extends AbstractLogoLib implements LogoLibInterface
|
||||
{
|
||||
/**
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
namespace App\Services\LogoLib;
|
||||
|
||||
use App\Services\LogoLib\AbstractLogoLib;
|
||||
use App\Services\LogoLib\LogoLibInterface;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
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';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected string $libUrl = 'https://raw.githubusercontent.com/2factorauth/twofactorauth/master/img/';
|
||||
|
||||
/**
|
||||
@ -37,7 +32,7 @@ class TfaLogoLib extends AbstractLogoLib implements LogoLibInterface
|
||||
public function __construct()
|
||||
{
|
||||
$this->setTfaCollection();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch a logo for the given service and save it as an icon
|
||||
@ -45,7 +40,7 @@ class TfaLogoLib extends AbstractLogoLib implements LogoLibInterface
|
||||
* @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
|
||||
*/
|
||||
public function getIcon(?string $serviceName, string $variant = null) : string|null
|
||||
public function getIcon(?string $serviceName, ?string $variant = null) : ?string
|
||||
{
|
||||
$logoFilename = $this->getLogo(strval($serviceName));
|
||||
|
||||
@ -74,8 +69,8 @@ class TfaLogoLib extends AbstractLogoLib implements LogoLibInterface
|
||||
*/
|
||||
protected function getLogo(string $serviceName)
|
||||
{
|
||||
$referenceName = $this->tfas->get($this->sanitizeServiceName(strval($serviceName)));
|
||||
$logoFilename = $referenceName . '.' . $this->format;
|
||||
$referenceName = $this->tfas->get($this->sanitizeServiceName(strval($serviceName)));
|
||||
$logoFilename = $referenceName . '.' . $this->format;
|
||||
$cachedFilename = $this->cachePrefix . $logoFilename;
|
||||
|
||||
if ($referenceName && ! Storage::disk('logos')->exists($cachedFilename)) {
|
||||
|
@ -109,7 +109,7 @@ Route::withoutMiddleware([
|
||||
SetLanguage::class,
|
||||
CustomCreateFreshApiToken::class,
|
||||
])->get('/up', function () {
|
||||
//Event::dispatch(new DiagnosingHealth);
|
||||
// Event::dispatch(new DiagnosingHealth);
|
||||
return view('health', [
|
||||
'isSecure' => str_starts_with(config('app.url'), 'https'),
|
||||
]);
|
||||
|
@ -27,7 +27,7 @@ class UserControllerTest extends FeatureTestCase
|
||||
'locked',
|
||||
];
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -53,7 +53,7 @@ class GroupControllerTest extends FeatureTestCase
|
||||
|
||||
private const NEW_GROUP_NAME = 'MyNewGroup';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -29,7 +29,7 @@ class IconControllerTest extends FeatureTestCase
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -28,7 +28,7 @@ class QrCodeControllerTest extends FeatureTestCase
|
||||
*/
|
||||
protected $twofaccount;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -45,7 +45,7 @@ class SettingControllerTest extends FeatureTestCase
|
||||
|
||||
private const USER_DEFINED_SETTING_CHANGED_VALUE = 'mySetting';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -233,7 +233,7 @@ class TwoFAccountControllerTest extends FeatureTestCase
|
||||
'secret' => OtpTestData::SECRET,
|
||||
];
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@ -400,7 +400,7 @@ class TwoFAccountControllerTest extends FeatureTestCase
|
||||
->assertJsonStructure(self::VALID_RESOURCE_STRUCTURE_WITHOUT_SECRET);
|
||||
}
|
||||
|
||||
//#[Test]
|
||||
// #[Test]
|
||||
// public function test_show_twofaccount_with_indeciphered_data_returns_replaced_data()
|
||||
// {
|
||||
// $dbEncryptionService = resolve('App\Services\DbEncryptionService');
|
||||
|
@ -57,7 +57,7 @@ class UserManagerControllerTest extends FeatureTestCase
|
||||
|
||||
private const PASSWORD = 'password';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -37,7 +37,7 @@ class GroupAssignRequestTest extends TestCase
|
||||
{
|
||||
$request = new GroupAssignRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
|
@ -29,7 +29,7 @@ class GroupStoreRequestTest extends FeatureTestCase
|
||||
|
||||
const UNIQUE_GROUP_NAME = 'MyGroup';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -56,51 +56,51 @@ class IconFetchRequestTest extends TestCase
|
||||
'service' => '~string.with-sp3ci@l-ch4rs',
|
||||
]],
|
||||
'VALID_SELFH_ICON_COLLECTION' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'selfh',
|
||||
]],
|
||||
'VALID_DASHBOARDICONS_ICON_COLLECTION' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'dashboardicons',
|
||||
]],
|
||||
'VALID_TFA_ICON_COLLECTION' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'tfa',
|
||||
]],
|
||||
'VALID_SELFH_ICON_COLLECTION_WITH_VALID_REGULAR_VARIANT' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'selfh',
|
||||
'variant' => 'regular',
|
||||
'variant' => 'regular',
|
||||
]],
|
||||
'VALID_SELFH_ICON_COLLECTION_WITH_VALID_LIGHT_VARIANT' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'selfh',
|
||||
'variant' => 'light',
|
||||
'variant' => 'light',
|
||||
]],
|
||||
'VALID_SELFH_ICON_COLLECTION_WITH_VALID_DARK_VARIANT' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'selfh',
|
||||
'variant' => 'dark',
|
||||
'variant' => 'dark',
|
||||
]],
|
||||
'VALID_DASHBOARDICONS_ICON_COLLECTION_WITH_VALID_REGULAR_VARIANT' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'dashboardicons',
|
||||
'variant' => 'regular',
|
||||
'variant' => 'regular',
|
||||
]],
|
||||
'VALID_DASHBOARDICONS_ICON_COLLECTION_WITH_VALID_LIGHT_VARIANT' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'dashboardicons',
|
||||
'variant' => 'light',
|
||||
'variant' => 'light',
|
||||
]],
|
||||
'VALID_DASHBOARDICONS_ICON_COLLECTION_WITH_VALID_DARK_VARIANT' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'dashboardicons',
|
||||
'variant' => 'dark',
|
||||
'variant' => 'dark',
|
||||
]],
|
||||
'VALID_TFA_ICON_COLLECTION_WITH_VALID_REGULAR_VARIANT' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'tfa',
|
||||
'variant' => 'regular',
|
||||
'variant' => 'regular',
|
||||
]],
|
||||
];
|
||||
}
|
||||
@ -127,22 +127,22 @@ class IconFetchRequestTest extends TestCase
|
||||
'service' => null,
|
||||
]],
|
||||
'NULL_ICON_COLLECTION' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => null,
|
||||
]],
|
||||
'NULL_VARIANT' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'tfa',
|
||||
'variant' => null,
|
||||
'variant' => null,
|
||||
]],
|
||||
'EMPTY_ICON_COLLECTION' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => '',
|
||||
]],
|
||||
'EMPTY_VARIANT' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'tfa',
|
||||
'variant' => '',
|
||||
'variant' => '',
|
||||
]],
|
||||
'SERVICE_AS_INT' => [[
|
||||
'service' => 0,
|
||||
@ -154,23 +154,23 @@ class IconFetchRequestTest extends TestCase
|
||||
'service' => [],
|
||||
]],
|
||||
'NOT_IN_ICON_COLLECTION_LIST' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'string_not_in_icon_collection_list',
|
||||
]],
|
||||
'NOT_IN_SELFH_VARIANT_LIST' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'selfh',
|
||||
'variant' => 'string_not_in_selfh_variant_list',
|
||||
'variant' => 'string_not_in_selfh_variant_list',
|
||||
]],
|
||||
'NOT_IN_DASHBOARDICONS_VARIANT_LIST' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'dashboardicons',
|
||||
'variant' => 'string_not_in_dashboardicons_variant_list',
|
||||
'variant' => 'string_not_in_dashboardicons_variant_list',
|
||||
]],
|
||||
'NOT_IN_TFA_VARIANT_LIST' => [[
|
||||
'service' => 'validWord',
|
||||
'service' => 'validWord',
|
||||
'iconCollection' => 'tfa',
|
||||
'variant' => 'string_not_in_tfa_variant_list',
|
||||
'variant' => 'string_not_in_tfa_variant_list',
|
||||
]],
|
||||
];
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class QrCodeDecodeRequestTest extends TestCase
|
||||
{
|
||||
$request = new QrCodeDecodeRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -64,7 +64,7 @@ class QrCodeDecodeRequestTest extends TestCase
|
||||
{
|
||||
$request = new QrCodeDecodeRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -40,7 +40,7 @@ class SettingStoreRequestTest extends FeatureTestCase
|
||||
{
|
||||
$request = new SettingStoreRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -75,7 +75,7 @@ class SettingStoreRequestTest extends FeatureTestCase
|
||||
|
||||
$request = new SettingStoreRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -37,7 +37,7 @@ class SettingUpdateRequestTest extends TestCase
|
||||
{
|
||||
$request = new SettingUpdateRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -67,7 +67,7 @@ class SettingUpdateRequestTest extends TestCase
|
||||
{
|
||||
$request = new SettingUpdateRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -38,7 +38,7 @@ class TwoFAccountBatchRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountBatchRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -50,7 +50,7 @@ class TwoFAccountBatchRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountBatchRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -37,7 +37,7 @@ class TwoFAccountExportRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountExportRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -85,7 +85,7 @@ class TwoFAccountExportRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountExportRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -37,7 +37,7 @@ class TwoFAccountImportRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountImportRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -61,7 +61,7 @@ class TwoFAccountImportRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountImportRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -38,7 +38,7 @@ class TwoFAccountIndexRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountIndexRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -50,7 +50,7 @@ class TwoFAccountIndexRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountIndexRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -37,7 +37,7 @@ class TwoFAccountReorderRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountReorderRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -64,7 +64,7 @@ class TwoFAccountReorderRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountReorderRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -39,7 +39,7 @@ class TwoFAccountStoreRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountStoreRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -115,7 +115,7 @@ class TwoFAccountStoreRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountStoreRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -39,7 +39,7 @@ class TwoFAccountUpdateRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountUpdateRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -91,7 +91,7 @@ class TwoFAccountUpdateRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountUpdateRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -37,7 +37,7 @@ class TwoFAccountUriRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountUriRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -68,7 +68,7 @@ class TwoFAccountUriRequestTest extends TestCase
|
||||
{
|
||||
$request = new TwoFAccountUriRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -37,7 +37,7 @@ class UserManagerPromoteRequestTest extends TestCase
|
||||
{
|
||||
$request = new UserManagerPromoteRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -70,7 +70,7 @@ class UserManagerPromoteRequestTest extends TestCase
|
||||
{
|
||||
$request = new UserManagerPromoteRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -43,7 +43,7 @@ class UserManagerStoreRequestTest extends FeatureTestCase
|
||||
|
||||
$request = new UserManagerStoreRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -83,7 +83,7 @@ class UserManagerStoreRequestTest extends FeatureTestCase
|
||||
|
||||
$request = new UserManagerStoreRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -11,9 +11,13 @@ use App\Services\LogoLib\TfaLogoLib;
|
||||
final class CommonDataProvider
|
||||
{
|
||||
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 = self::SELFH_URL_ROOT . '*';
|
||||
|
||||
const DASHBOARDICONS_URL_ROOT = 'https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/';
|
||||
|
||||
const DASHBOARDICONS_URL = self::DASHBOARDICONS_URL_ROOT . '*';
|
||||
|
||||
public static function iconsCollectionProvider() : array
|
||||
@ -22,7 +26,7 @@ final class CommonDataProvider
|
||||
'TFA' => [[
|
||||
'name' => 'tfa',
|
||||
'class' => TfaLogoLib::class,
|
||||
|
||||
|
||||
]],
|
||||
'SELFH' => [[
|
||||
'name' => 'selfh',
|
||||
@ -34,5 +38,4 @@ final class CommonDataProvider
|
||||
]],
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ class FixServiceFieldEncryptionTest extends FeatureTestCase
|
||||
*/
|
||||
protected $command = '2fauth:fix-service-encryption';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -16,7 +16,7 @@ class PurgeLogTest extends FeatureTestCase
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@ -24,14 +24,14 @@ class PurgeLogTest extends FeatureTestCase
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function test_purgeLog_completes()
|
||||
public function test_purge_log_completes()
|
||||
{
|
||||
$this->artisan('2fauth:purge-log')
|
||||
->assertSuccessful();
|
||||
}
|
||||
|
||||
#[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();
|
||||
$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';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -30,7 +30,7 @@ class PasswordControllerTest extends FeatureTestCase
|
||||
|
||||
private const REVERSE_PROXY_GUARD = 'reverse-proxy-guard';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -34,7 +34,7 @@ class RegisterControllerTest extends FeatureTestCase
|
||||
|
||||
private const EMAIL_FILTERING_RULE = '^[A-Za-z0-9._%+-]+@example\.org';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class SocialiteControllerTest extends FeatureTestCase
|
||||
|
||||
private const USER_EMAIL = 'john@provider.com';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@ -83,7 +83,7 @@ class SocialiteControllerTest extends FeatureTestCase
|
||||
#[Test]
|
||||
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);
|
||||
|
||||
$response = $this->get('/socialite/redirect/github');
|
||||
|
@ -34,7 +34,7 @@ class UserControllerTest extends FeatureTestCase
|
||||
|
||||
private const PASSWORD = 'password';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -32,7 +32,7 @@ class WebAuthnDeviceLostControllerTest extends FeatureTestCase
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@ -40,7 +40,7 @@ class WebAuthnDeviceLostControllerTest extends FeatureTestCase
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function test_sendRecoveryEmail_sends_notification_on_success()
|
||||
public function test_send_recovery_email_sends_notification_on_success()
|
||||
{
|
||||
Notification::fake();
|
||||
|
||||
|
@ -95,7 +95,7 @@ class WebAuthnLoginControllerTest extends FeatureTestCase
|
||||
|
||||
const ASSERTION_CHALLENGE = 'iXozmynKi+YD2iRvKNbSPA==';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -32,7 +32,7 @@ class WebAuthnManageControllerTest extends FeatureTestCase
|
||||
|
||||
public const CREDENTIAL_ID_RAW = '+VOLFKPY+/FuMI/sJ7gMllK76L3VoRUINj6lL/Z3qDg=';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -36,7 +36,7 @@ class WebAuthnRecoveryControllerTest extends FeatureTestCase
|
||||
|
||||
const CREDENTIAL_ID = '-VOLFKPY-_FuMI_sJ7gMllK76L3VoRUINj6lL_Z3qDg';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -24,7 +24,7 @@ class WebAuthnRegisterControllerTest extends FeatureTestCase
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@ -32,7 +32,7 @@ class WebAuthnRegisterControllerTest extends FeatureTestCase
|
||||
}
|
||||
|
||||
#[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);
|
||||
|
||||
|
@ -30,7 +30,7 @@ class RejectIfSsoOnlyAndNotForAdminMiddlewareTest extends FeatureTestCase
|
||||
|
||||
private const PASSWORD = 'password';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -37,7 +37,7 @@ class LoginRequestTest extends FeatureTestCase
|
||||
|
||||
$request = new LoginRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -70,7 +70,7 @@ class LoginRequestTest extends FeatureTestCase
|
||||
|
||||
$request = new LoginRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -37,7 +37,7 @@ class UserDeleteRequestTest extends FeatureTestCase
|
||||
{
|
||||
$request = new UserDeleteRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -61,7 +61,7 @@ class UserDeleteRequestTest extends FeatureTestCase
|
||||
{
|
||||
$request = new UserDeleteRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -37,7 +37,7 @@ class UserPatchPwdRequestTest extends TestCase
|
||||
{
|
||||
$request = new UserPatchPwdRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -63,7 +63,7 @@ class UserPatchPwdRequestTest extends TestCase
|
||||
{
|
||||
$request = new UserPatchPwdRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -38,7 +38,7 @@ class UserStoreRequestTest extends FeatureTestCase
|
||||
|
||||
$request = new UserStoreRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -76,7 +76,7 @@ class UserStoreRequestTest extends FeatureTestCase
|
||||
|
||||
$request = new UserStoreRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -24,7 +24,7 @@ class WebauthnAssertedRequestTest extends TestCase
|
||||
{
|
||||
$request = new WebauthnAssertedRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -57,7 +57,7 @@ class WebauthnAssertedRequestTest extends TestCase
|
||||
{
|
||||
$request = new WebauthnAssertedRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -43,7 +43,7 @@ class WebauthnRenameRequestTest extends TestCase
|
||||
{
|
||||
$request = new WebauthnRenameRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertFalse($validator->fails());
|
||||
@ -67,7 +67,7 @@ class WebauthnRenameRequestTest extends TestCase
|
||||
{
|
||||
$request = new WebauthnRenameRequest;
|
||||
$request->merge($data);
|
||||
|
||||
|
||||
$validator = Validator::make($data, $request->rules());
|
||||
|
||||
$this->assertTrue($validator->fails());
|
||||
|
@ -28,7 +28,7 @@ class SystemControllerTest extends FeatureTestCase
|
||||
|
||||
protected $admin;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -43,7 +43,7 @@ class TwoFAccountModelTest extends FeatureTestCase
|
||||
*/
|
||||
protected $helpers;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -31,7 +31,7 @@ class FailedLoginNotificationTest extends FeatureTestCase
|
||||
*/
|
||||
protected $failedLogin;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -31,7 +31,7 @@ class SignedInWithNewDeviceNotificationTest extends FeatureTestCase
|
||||
*/
|
||||
protected $signedInWithNewDevice;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -25,7 +25,7 @@ class TestEmailSettingNotificationTest extends FeatureTestCase
|
||||
*/
|
||||
protected $testEmailSettingNotification;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -26,7 +26,7 @@ class WebauthnRecoveryNotificationTest extends FeatureTestCase
|
||||
*/
|
||||
protected $webauthnRecoveryNotification;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -32,7 +32,7 @@ class ManagePatPermissionsTest extends FeatureTestCase
|
||||
|
||||
private const PASSWORD = 'password';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -34,7 +34,7 @@ class ManageWebauthnPermissionsTest extends FeatureTestCase
|
||||
|
||||
private const PASSWORD = 'password';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -49,7 +49,7 @@ class GroupServiceTest extends FeatureTestCase
|
||||
|
||||
private const NEW_GROUP_NAME = 'MyNewGroup';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -30,7 +30,7 @@ class IconServiceTest extends FeatureTestCase
|
||||
|
||||
protected IconService $iconService;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -33,7 +33,7 @@ class IconStoreServiceTest extends FeatureTestCase
|
||||
*/
|
||||
protected IconStoreService $iconStore;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -33,7 +33,7 @@ class LogoLibsTest extends FeatureTestCase
|
||||
|
||||
protected LogoLibInterface $logoLib;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@ -160,14 +160,14 @@ class LogoLibsTest extends FeatureTestCase
|
||||
#[Test]
|
||||
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->save();
|
||||
|
||||
Http::preventStrayRequests();
|
||||
Http::fake([
|
||||
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.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),
|
||||
]);
|
||||
|
||||
$this->logoLib = $this->app->make(SelfhLogoLib::class);
|
||||
@ -198,13 +198,13 @@ class LogoLibsTest extends FeatureTestCase
|
||||
{
|
||||
return [
|
||||
'INVALID_VARIANT' => [
|
||||
'not_a_valid_variant'
|
||||
'not_a_valid_variant',
|
||||
],
|
||||
'NULL_VARIANT' => [
|
||||
null
|
||||
null,
|
||||
],
|
||||
'EMPTY_VARIANT' => [
|
||||
''
|
||||
'',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class QrCodeServiceTest extends FeatureTestCase
|
||||
|
||||
private const DECODED_IMAGE = 'otpauth://totp/test@test.com?secret=A4GRFHVIRBGY7UIW';
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class ReleaseRadarServiceTest extends FeatureTestCase
|
||||
{
|
||||
use WithoutMiddleware;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
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;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -40,7 +40,7 @@ class TwoFAccountServiceTest extends FeatureTestCase
|
||||
|
||||
protected $userGroupB;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -15,7 +15,7 @@ use Tests\FeatureTestCase;
|
||||
#[CoversClass(SinglePageController::class)]
|
||||
class ViewTest extends FeatureTestCase
|
||||
{
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -29,7 +29,7 @@ class GroupControllerTest extends TestCase
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@ -69,7 +69,7 @@ class MigratorTest extends TestCase
|
||||
|
||||
protected $fakeTwofaccount;
|
||||
|
||||
public function setUp() : void
|
||||
protected function setUp() : void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user