To execute phpunit tests within a docker container, utilize this plugin an extension of the neotest-phpunit plugin. This facilitates the seamless execution of tests within the specified dokcer container environment.
Based on your ideal preferances, install with any package manager as shown below
cargo install neotest-docker-phpunit
git clone https://github.com/praem90/neotest-docker-phpunit.git
cd neotest-docker-phpunit
cargo build
Plug "nvim-neotest/neotest"
Plug "olimorris/neotest-phpunit"
Plug "praem90/neotest-docker-phpunit.nvim"
Configure your neovim neotest-phpunit plugin to utilize an alternative binary, replacing the default phpunit executable.
require('neotest').setup({
adapters = {
require('neotest-docker-phpunit')({
phpunit_cmd = "{PATH_TO}/neotest-docker-phpunit",
docker_phpunit = {
"/home/user/projects/another/project" = {
container = "phpunit-debug",
volume = "/home/user/projects/another/project:/docker/work/dir"
standalone = true,
}
default = {
container = "phpunit",
volume = "/source/dir:/docker/work/dir"
standalone = false,
callback = function (spec, args)
return spec
end
}
}
}),
}
})
- Improve STDOUT
- Improve document