ldc-boutique-cnc-sable/tests/Pest.php

42 lines
1,013 B
PHP
Raw Permalink Normal View History

2026-06-14 21:32:07 +02:00
<?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/Actions/*',
2026-06-14 21:32:07 +02:00
'*/app/Dto/*',
'*/app/Queries/*',
2026-06-14 21:32:07 +02:00
'*/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');