Create Test Files With Artisan Make Commands Automatically

Create Test Files With Artisan Make Commands Automatically

The Laravel make-testable package creates a test along with any class created using php artisan make:* commands. After installing this package a development dependency, you can use it by adding the --test flag to make commands:

# Before
php artisan make:model Blog
php artisan make:test Models\BlogTest --unit

# After
php artisan make:model Blog --test

This package supports the following commands:

  • Command
  • Controller
  • Event
  • Job
  • Listener
  • Middleware
  • Model
  • Notification

You can learn more about this package, get full installation instructions, and view the source code on GitHub at iaK/make-testable.


This package was submitted to our Laravel News Links section. Links is a place the community can post packages and tutorials around the Laravel ecosystem. Follow along on Twitter @LaravelLinks

Filed in: News

Newsletter

Join 31,000+ others and never miss out on new tips, tutorials, and more.

Laravel News Partners

Laravel Jobs

Senior Laravel Developer
Remote
EC Pro
Senior Full-Stack Engineer
[REMOTE: USA Only] All Other Applications Will be Rejected Immediately"
Curricula
Senior Full Stack PHP Developer
Canada
Motto Design Studio
Software Engineer
Remote, USA Only
Grow Progress
Lead Backend PHP Developer
Hamburg, Deutschland
ABOUT YOU GmbH