Skip to content

Commit

Permalink
Update ArchTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jewei committed May 3, 2024
1 parent 7049bf9 commit de6ab79
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions tests/Feature/ArchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,24 @@
->expect('App\Enums')
->toBeEnums();

test('Exceptions')
->expect('App\Exceptions')
->toExtend('Exception');

test('Controllers')
->expect('App\Http\Controllers')
->toHaveSuffix('Controller');
->toHaveSuffix('Controller')
->toExtend('App\Http\Controllers\Controller');

test('Commands')
->expect('App\Console\Commands')
->toExtend('Illuminate\Console\Command')
->toHaveMethod('handle');

test('Jobs')
->expect('App\Jobs')
->toImplement('Illuminate\Contracts\Queue\ShouldQueue');
->toImplement('Illuminate\Contracts\Queue\ShouldQueue')
->toHaveMethod('handle');

test('Models')
->expect('App\Models')
Expand All @@ -36,5 +47,5 @@
->toImplementNothing();

test('Not debugging statements are left in our code.')
->expect(['dd', 'dump', 'var_dump', 'print_f'])
->not->toBeUsed();
->expect(['dd', 'ddd', 'die', 'dump', 'var_dump', 'print_f', 'sleep'])
->toBeUsedInNothing();

0 comments on commit de6ab79

Please sign in to comment.