ldc-arcadia-api/tests/Pest.php
Jérémy Munsch 985fcedb04
test(WebExceptionRenderer): add tests for rendering exceptions
Add tests to verify the behavior of WebExceptionRenderer for NotFoundException and unhandled exceptions.
2026-08-13 12:18:22 +02:00

43 lines
997 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([
'*/Usecase/*',
'*/Dto/*',
'*/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(LaravelTestCase::class)
->in('Integration/Presentation');
pest()
->extend(BasePHPUnitTestCase::class)
->in('Integration/Standalones');
pest()
->extend(BasePHPUnitTestCase::class)
->in('Unit');
pest()->extend(LaravelTestCase::class)->in('Unit/App/Casts');