Currently I have started learning about Unit Testing in Laravel 5.6. By default my laravel project has a 'tests' directory inside which I have 2 more directories namely, 'Features' and 'Unit'. Each of these directories contain a 'ExampleTest.php'
./tests/Features/ExampleTest.php
./tests/Unit/ExampleTest.php
Whenever I create new test file using command
php artisan make:test BasicTest
It always creates the test file inside the 'Features' directory by default, where as I want the file to be created under the 'tests' directory.
Is there a command using which I can specify the path fro creation of the test file. Something like this
php artisan make:test BasicTest --path="tests"
I have already tried the above path command but it is not a valid command.
Do I need to change some code in my phpunit.xml file?
php artisan make:test Web/StatementPolicies/StatementPolicyListTest
It will by default create a file namely StatementPolicyListTest under StatementPolicies(if not exist it will create a new folder of this name) folder under tests/Feature/Web
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With