Add tests to verify the behavior of WebExceptionRenderer for NotFoundException and unhandled exceptions.
43 lines
997 B
PHP
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');
|