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:
You can learn more about this package, get full installation instructions, and view the source code on GitHub at iaK/make-testable.