php artisan migrate:refresh --seed // This will clean, migrate, then seed the db
phpunit // Run tests
If I understand correctly, you could run these two commands in the command line. I'm guessing you're looking for a solution to do it all within just calling phpunit, but I just do: alias phpu='php artisan migrate:refresh --seed; phpunit'
.
Is this what you're looking for?
Is this what you're looking for ?
Ah yes, that's a good idea ! For some reason I felt obliged to do the refresh / migrations within phpunit, but it's much simpler this way indeed.
Thanks a lot.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community