mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-14 15:58:36 +02:00
Refactor logoService to the laravel manager+driver pattern
This commit is contained in:
@ -16,7 +16,7 @@ use App\Models\User;
|
||||
use App\Policies\TwoFAccountPolicy;
|
||||
use App\Providers\MigrationServiceProvider;
|
||||
use App\Providers\TwoFAuthServiceProvider;
|
||||
use App\Services\LogoService;
|
||||
use App\Services\LogoLib\TfaLogoLib;
|
||||
use Illuminate\Http\Testing\FileFactory;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
@ -242,8 +242,8 @@ class TwoFAccountControllerTest extends FeatureTestCase
|
||||
|
||||
Http::preventStrayRequests();
|
||||
Http::fake([
|
||||
LogoService::TFA_IMG_URL . '*' => Http::response(HttpRequestTestData::SVG_LOGO_BODY, 200),
|
||||
LogoService::TFA_URL => Http::response(HttpRequestTestData::TFA_JSON_BODY, 200),
|
||||
TfaLogoLib::IMG_URL . '*' => Http::response(HttpRequestTestData::SVG_LOGO_BODY, 200),
|
||||
TfaLogoLib::TFA_URL => Http::response(HttpRequestTestData::TFA_JSON_BODY, 200),
|
||||
OtpTestData::EXTERNAL_IMAGE_URL_DECODED => Http::response((new FileFactory)->image('file.png', 10, 10)->tempFile, 200),
|
||||
OtpTestData::EXTERNAL_INFECTED_IMAGE_URL_DECODED => Http::response((new FileFactory)->createWithContent('infected.svg', OtpTestData::ICON_SVG_DATA_INFECTED)->tempFile, 200),
|
||||
'example.com/*' => Http::response(null, 400),
|
||||
|
Reference in New Issue
Block a user