Last active
July 23, 2019 07:10
-
-
Save jasonmccreary/04ca75524003277b8ef175b0d8e2d2f8 to your computer and use it in GitHub Desktop.
One-line shell script to generate HTTP Tests for your application's controllers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run `artisan make:test` for all Controllers under `your app/Http/Controllers` folder. | |
# Created tests mirror their path under the `app` folder and are suffixed with "Test". | |
find app/Http/Controllers -type f -name '*Controller.php' -exec sh -c 'php artisan make:test $(dirname "${1:4}")/$(basename "$1" .php)Test' sh {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment