diff --git a/src/ArchPresets/Laravel.php b/src/ArchPresets/Laravel.php index ceeb7d4b..59274f3f 100644 --- a/src/ArchPresets/Laravel.php +++ b/src/ArchPresets/Laravel.php @@ -21,5 +21,51 @@ final class Laravel extends AbstractPreset $this->expectations[] = expect([ 'exit', ])->not->toBeUsed(); + + $this->expectations[] = expect('App\Http\Controllers') + ->toHaveSuffix('Controller'); + + $this->expectations[] = expect('App\Http\Middleware') + ->toHaveMethod('handle'); + + $this->expectations[] = expect('App\Models') + ->not->toHaveSuffix('Model'); + + $this->expectations[] = expect('App\Http\Requests') + ->toHaveSuffix('Request') + ->toExtend('Illuminate\Foundation\Http\FormRequest') + ->toHaveMethod('rules'); + + $this->expectations[] = expect('App\Console\Commands') + ->toHaveSuffix('Command') + ->toExtend('Illuminate\Console\Command') + ->toHaveMethod('handle') + ->toImplementNothing(); + + $this->expectations[] = expect('App\Exceptions') + ->toImplement('Throwable'); + + $this->expectations[] = expect('App\Mail') + ->toHaveConstructor() + ->toExtend('Illuminate\Mail\Mailable'); + + $this->expectations[] = expect('App\Jobs') + ->toHaveMethod('handle') + ->toHaveConstructor(); + + $this->expectations[] = expect('App\Listeners') + ->toHaveMethod('handle'); + + $this->expectations[] = expect('App\Events') + ->toHaveConstructor(); + + $this->expectations[] = expect('App\Notifications') + ->toHaveConstructor() + ->toExtend('Illuminate\Notifications\Notification'); + + $this->expectations[] = expect('App\Providers') + ->toHaveSuffix('ServiceProvider') + ->toExtend('Illuminate\Support\ServiceProvider') + ->not->toBeUsed(); } }