ldc-cocotte/tests/Pest.php
Jérémy Munsch d0efb0f527
refactor: update namespaces for actions and queries
Refactored the codebase to change the namespaces of various actions and queries from `App\Actions` to `App\Cqs\Actions` and `App\Queries` to `App\Cqs\Queries`. This restructuring improves organization and clarity in the codebase.
2026-11-10 15:13:26 +01:00

41 lines
1,021 B
PHP

<?php
declare(strict_types=1);
use DG\BypassFinals;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Http;
use PHPUnit\Framework\TestCase as BasePHPUnitTestCase;
use Tests\TestCase as LaravelTestCase;
BypassFinals::enable(bypassReadOnly: false, bypassFinal: true);
BypassFinals::denyPaths([
'*/app/Cqs/Actions/*',
'*/app/Dto/*',
'*/app/Cqs/Queries/*',
'*/domain/Models/*',
'*/shared/DDD/*',
]);
pest()
->extend(LaravelTestCase::class)
->use(RefreshDatabase::class)
->beforeEach(function (): void {
Http::preventStrayRequests();
})
->in('Feature');
pest()
->extend(LaravelTestCase::class)
->use(RefreshDatabase::class)
->in('Integration/WithApp');
pest()
->extend(BasePHPUnitTestCase::class)
->in('Integration/Standalones');
pest()
->extend(BasePHPUnitTestCase::class)
->in('Unit');
pest()->extend(LaravelTestCase::class)->in('Unit/App/Casts');
pest()->extend(LaravelTestCase::class)->in('Unit/Services');