iak / make-testable
Create a test along with any class created using the laravel make command
Installs: 5 560
Dependents: 0
Suggesters: 0
Security: 0
Stars: 62
Watchers: 3
Forks: 4
Open Issues: 0
Requires
- php: ^7.4
- laravel/legacy-factories: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.3
- vimeo/psalm: ^3.11
This package is auto-updated.
Last update: 2022-10-18 10:08:53 UTC
README
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.
Usage
Simply add on a --test option to your make commands, and a test will be created simultaneously.
Example
$ 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
Todo
- Export a config file with customizable locations, naming conventions and options for the test command.
Installation
You can install the package via composer:
composer require iak/make-testable --dev
Testing
composer test
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.