julianstark999 / laravel-tests-generator
laravel-tests-generator
Fund package maintenance!
julianstark999
Requires
- php: ^7.4|^8.0
- illuminate/console: ^8.0
- illuminate/support: ^8.0
- spatie/laravel-package-tools: ^1.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.17
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.3
- vimeo/psalm: ^4.6
This package is auto-updated.
Last update: 2025-04-20 00:26:52 UTC
README
Create all missing Tests
This Laravel package provides a command to automatically generate all missing tests
Installation
You can install the package via composer:
composer require julianstark999/laravel-tests-generator
You can publish the config file with:
php artisan vendor:publish --provider="JulianStark999\LaravelTestsGenerator\LaravelTestsGeneratorServiceProvider" --tag="laravel-tests-generator-config"
This is the contents of the published config file:
return [ 'directories' => [ 'actions' => 'Actions', 'commands' => 'Console\Commands', 'enums' => 'Enums', 'exceptions' => 'Exceptions', 'helper' => 'Helper', 'controllers' => 'Http\Controllers', 'middleware' => 'Http\Middleware', 'requests' => 'Http\Requests', 'resources' => 'Http\Resources', 'jobs' => 'Jobs', 'mail' => 'Mail', 'models' => 'Models', 'notifications' => 'Notifications', 'observers' => 'Observers', 'providers' => 'Providers', 'rules' => 'Rules', 'services' => 'Services', 'traits' => 'Traits', 'views' => 'View', ], ];
Usage
Commands
tests-generator {--dir=*}
The tests-generator
command generates missing tests
php artisan tests-generator {--dir=*} # example php artisan tests-generator --dir=controllers
See the configuration file example or publish it yourself for all available dirs
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.