Fixes tests

This commit is contained in:
Nuno Maduro
2025-04-20 22:19:25 +01:00
parent 8cfb0acf46
commit 791734a29c
8 changed files with 73 additions and 66 deletions

View File

@ -2,57 +2,57 @@
use Pest\Expectation;
// arch()->preset()->php()->ignoring([
// Expectation::class,
// 'debug_backtrace',
// 'var_export',
// 'xdebug_info',
// ]);
arch()->preset()->php()->ignoring([
Expectation::class,
'debug_backtrace',
'var_export',
'xdebug_info',
]);
// arch()->preset()->strict()->ignoring([
// 'usleep',
// ]);
arch()->preset()->strict()->ignoring([
'usleep',
]);
// arch()->preset()->security()->ignoring([
// 'eval',
// 'str_shuffle',
// 'exec',
// 'unserialize',
// 'extract',
// 'assert',
// ]);
arch()->preset()->security()->ignoring([
'eval',
'str_shuffle',
'exec',
'unserialize',
'extract',
'assert',
]);
// arch('globals')
// ->expect(['dd', 'dump', 'ray', 'die', 'var_dump', 'sleep'])
// ->not->toBeUsed()
// ->ignoring(Expectation::class);
arch('globals')
->expect(['dd', 'dump', 'ray', 'die', 'var_dump', 'sleep'])
->not->toBeUsed()
->ignoring(Expectation::class);
// arch('dependencies')
// ->expect('Pest')
// ->toOnlyUse([
// 'dd',
// 'dump',
// 'expect',
// 'uses',
// 'Termwind',
// 'ParaTest',
// 'Pest\Arch',
// 'Pest\Mutate\Contracts\Configuration',
// 'Pest\Mutate\Decorators\TestCallDecorator',
// 'Pest\Mutate\Repositories\ConfigurationRepository',
// 'Pest\Plugin',
// 'NunoMaduro\Collision',
// 'Whoops',
// 'Symfony\Component\Console',
// 'Symfony\Component\Process',
// ])->ignoring(['Composer', 'PHPUnit', 'SebastianBergmann']);
arch('dependencies')
->expect('Pest')
->toOnlyUse([
'dd',
'dump',
'expect',
'uses',
'Termwind',
'ParaTest',
'Pest\Arch',
'Pest\Mutate\Contracts\Configuration',
'Pest\Mutate\Decorators\TestCallDecorator',
'Pest\Mutate\Repositories\ConfigurationRepository',
'Pest\Plugin',
'NunoMaduro\Collision',
'Whoops',
'Symfony\Component\Console',
'Symfony\Component\Process',
])->ignoring(['Composer', 'PHPUnit', 'SebastianBergmann']);
// arch('contracts')
// ->expect('Pest\Contracts')
// ->toOnlyUse([
// 'NunoMaduro\Collision\Contracts',
// 'Pest\Factories\TestCaseMethodFactory',
// 'Symfony\Component\Console',
// 'Pest\Arch\Contracts',
// 'Pest\PendingCalls',
// ])->toBeInterfaces();
arch('contracts')
->expect('Pest\Contracts')
->toOnlyUse([
'NunoMaduro\Collision\Contracts',
'Pest\Factories\TestCaseMethodFactory',
'Symfony\Component\Console',
'Pest\Arch\Contracts',
'Pest\PendingCalls',
])->toBeInterfaces();