/make-testable

Create a test along with your class, when using the laravel make command

Primary LanguagePHPMIT LicenseMIT

[SOON TO BE DEPRECATED] Laravel make-testable

Latest Version on Packagist GitHub Tests Action Status Total Downloads

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.