ldc-boutique-cnc-sable/tests/Pest.php
2026-10-27 09:58:12 +01:00

42 lines
1 KiB
PHP

<?php
declare(strict_types=1);
use App\Services\CrmService;
use DG\BypassFinals;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Http;
use LDC\LDCCRM\CrmApiV4;
use PHPUnit\Framework\TestCase as BasePHPUnitTestCase;
use Tests\TestCase as LaravelTestCase;
BypassFinals::enable(bypassReadOnly: false, bypassFinal: true);
BypassFinals::denyPaths([
'*/app/Dto/*',
'*/domain/Models/*',
'*/shared/DDD/*',
]);
pest()
->extend(LaravelTestCase::class)
->use(RefreshDatabase::class)
->beforeEach(function (): void {
Http::preventStrayRequests();
mock(CrmApiV4::class);
mock(CrmService::class);
})
->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');