test(tests): move Laravel-bound tests out of Unit and group Unit Cqs tests (lot 3B)

This commit is contained in:
Jérémy Munsch 2026-11-16 13:02:15 +01:00
parent 7b27f532ee
commit 3f4856efa2
No known key found for this signature in database
GPG key ID: 2AAECDA6B7330F91
30 changed files with 7 additions and 7 deletions

View file

@ -2,6 +2,8 @@
declare(strict_types=1);
namespace Tests\Feature\App\Http\Middleware;
use App\Http\Middleware\EnsureCustomerEmailIsVerified;
use App\Models\Customer;
use Illuminate\Http\RedirectResponse;
@ -11,9 +13,6 @@ use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\URL;
use Infrastructure\Adapters\Services\AppCustomerAuthService;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Tests\TestCase;
uses(TestCase::class);
describe('EnsureCustomerEmailIsVerified', function () {
it('redirects to fo.auth.verification.notice if customer is not verified', function () {

View file

@ -2,6 +2,8 @@
declare(strict_types=1);
namespace Tests\Integration\WithApp\App\Dto;
use App\Dto\PageDto;
use App\Models\Page;
use Domain\Enums\StaticPageSlug;

View file

@ -2,6 +2,8 @@
declare(strict_types=1);
namespace Tests\Integration\WithApp\Infra\Adapters\Services;
use App\Models\User;
use Domain\Exceptions\AuthServiceException;
use Illuminate\Contracts\Auth\StatefulGuard;

View file

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace Tests\Unit\Infra\Adapters\Services;
namespace Tests\Integration\WithApp\Infra\Adapters\Services;
use App\Exceptions\CrmServiceException;
use App\Models\Customer;
@ -15,7 +15,6 @@ use Domain\Models\ValueObjects\Email;
use Domain\Services\ShopperService;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Contracts\Auth\StatefulGuard;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Infrastructure\Adapters\Services\AppCustomerAuthService;
use Mockery;
use Ramsey\Uuid\Uuid;
@ -388,8 +387,6 @@ describe('AppCustomerAuthService', function (): void {
$hashcode = new CrmHashcode(Uuid::uuid4());
$customer->hashcode = $hashcode;
app()->instance(ExceptionHandler::class, Mockery::mock(ExceptionHandler::class)->shouldIgnoreMissing());
$exception = new CrmServiceException('Crm Error');
$crmService->shouldReceive('getCustomerFromHashCode')->with($customer->hashcode)->andReturn($exception);