Skip to content

make:laravel:test ​

Scaffold a PHPUnit Feature or Unit test file for a module

Signature: modularous:make:laravel:test

Alias: modularous:create:laravel:test

Category: Make


Description ​

Creates a PHPUnit test file using LaravelTestGenerator. Accepts a module and test name. Pass --unit to generate a Unit test; the default is a Feature test.


Usage ​

modularous:make:laravel:test [options] <module> <test>

Arguments ​

ArgumentRequiredDescription
moduleyesTarget module
testyesTest class name

Options ​

OptionDescription
--unitGenerate as a PHPUnit Unit test instead of Feature test

Examples ​

Feature test ​

bash
php artisan modularous:make:laravel:test Blog PostControllerTest

Unit test ​

bash
php artisan modularous:make:laravel:test Blog PostRepositoryTest --unit

Notes ​

  • This command uses LaravelTestGenerator — refer to the generator documentation for output path and stub details.

See also ​