Here is how I run php unit tests in docker (laradock) in vscode
settings.json
{
....
"phpunit.command": "docker-compose -f ./../laradock-wmw-es/docker-compose.yml exec --user=laradock -w /var/www/laravel workspace php artisan dusk ${phpunitargs}",
"phpunit.phpunit": "./vendor/bin/phpunit",
"phpunit.paths": {
"${workspaceFolder}": "/var/www/laravel/"
},
....
}
I run php artisan dusk
as it runs both regular tests and dusk tests.