Let artisan make:test
read namespace for tests directory from composer.json
#52497
Unanswered
geoffreyvanwyk
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The other
artisan make:*
commands read the application's namespace from composer.json. It would make sense forartisan make:test
to read the tests directory's namespace from composer.json as well.One could update
\Illuminate\Foundation\Console\TestMakeCommand::rootNamespace()
to be similar to\Illuminate\Foundation\Application::getNamespace()
I saw that I could override the
artisan make:test
command with:App\Commands\TestMakeCommand
would extend the original and overriderootNamespace()
. Additionally,getPath()
would also need to be overridden to insert a slash betweenbase_path('tests')
andstr_replace()
.Beta Was this translation helpful? Give feedback.
All reactions