iak/make-testable

This package is abandoned and no longer maintained. No replacement package was suggested.

Create a test along with any class created using the laravel make command

1.0.0 2020-09-17 19:20 UTC

This package is auto-updated.

Last update: 2022-10-18 10:08:53 UTC


README

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.