diff --git a/tests/Feature/ArchTest.php b/tests/Feature/ArchTest.php index a37777bdbb8..6545c19126d 100644 --- a/tests/Feature/ArchTest.php +++ b/tests/Feature/ArchTest.php @@ -1,5 +1,6 @@ preset()->php(); -// arch()->preset()->security(); -// arch()->preset()->strict(); +arch()->preset()->php(); +arch()->preset()->security(); +arch()->preset()->strict()->ignoring([ + App\Commands\Command::class, + App\Commands\FeedCommand::class, +]); // arch()->preset()->relaxed(); arch('will not use debugging functions') ->group(__DIR__, __FILE__) - ->skip() + // ->skip() ->expect([ 'echo', 'print', diff --git a/tests/Pest.php b/tests/Pest.php index 63529960ad4..9defe358519 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -19,7 +19,18 @@ use Pest\Expectation; uses(Tests\TestCase::class) - ->beforeAll(function (): void {}) + ->beforeAll(function (): void { + foreach ( + Symfony\Component\Finder\Finder::create() + ->in(__DIR__.'/../vendor/guanguans/ai-commit/app') + ->notName('helpers.php') + ->name('*.php') as $splFileInfo + ) { + unlink($splFileInfo->getPathname()); + } + + file_put_contents(__DIR__.'/../vendor/guanguans/ai-commit/app/Support/helpers.php', 'beforeEach(function (): void {}) ->afterEach(function (): void {}) ->afterAll(function (): void {