This functionality is soon available in laravel core. This package will therefore be deprecated and should not be installed >= v8 laravel apps
Create a test along with any class created using the laravel make command.
Simply add on a --test option to your make commands, and a test will be created simultaneously.
$ php artisan make:model Blog --test
is the same as
$ php artisan make:model Blog
$ php artisan make:test Models\BlogTest --unit
You can make tests for the following classes:
- Command
- Controller
- Event
- Job
- Listener
- Middleware
- Model
- Notification
- Export a config file with customizable locations, naming conventions and options for the test command.
You can install the package via composer:
composer require iak/make-testable --dev
composer test
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.