Skip to content

Commit cf4549d

Browse files
author
Vignesh C
committed
updated readme file
1 parent e249122 commit cf4549d

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.md

100644100755
Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
1-
# laravel-test-generator
2-
Auto generate laravel unit test file based on the routes and form request files
1+
# Laravel Test Generator
2+
3+
Auto generate the unit test file for the available routes
4+
5+
## Installation
6+
7+
The package can easily be installed by running `composer require vigneshc91/laravel-test-generator` in your project's root folder.
8+
9+
If you are running a version of Laravel < 5.5 also make sure you add `Vigneshc91\LaravelTestGenerator\TestGeneratorServiceProvider::class` to the `providers` array in `config/app.php`.
10+
11+
This will register the artisan command that will be available to you.
12+
13+
14+
## Usage
15+
16+
Generating the test file is easy, simply run `php artisan laravel-test:generate` in your project root. This will write all the test cases into the file based on controller.
17+
18+
If you wish to filter for specific routes only, you can pass a filter attribute using --filter, for example `php artisan laravel-test:generate --filter='/api'`
19+
20+
If you wish to change the directory of creating the test file, you can pass a directory using --dir, for example `php artisan laravel-validation:generate --dir='V1'`
21+
22+
If you wish to add the @depends attribute to all the function except the first function for running test cases synchronously, you can pass a sync attribute using --sync, for example `php artisan laravel-test:generate --sync='true'`

0 commit comments

Comments
 (0)