Make quickfix work fine with vim-test and phpunit
Using vim-plug, add
Plug 'janko-m/vim-test'
Plug 'tpope/vim-dispatch'
Plup 'haginaga/vim-compiler-phpunit'to .vimrc file (see vim-plug documentation for where), and run :PlugInstall.
Add useful configurations to .vimrc file:
let g:test#strategy = 'dispatch' " To use quickfix
let g:test#php#phpunit#options = {
\ 'nearest': '--no-coverage',
\ 'file': '--no-coverage',
\}
augroup Test
autocmd!
autocmd BufNewFile,BufRead *Test.php :compiler phpunit
augroup END
let g:dispatch_compilers = {
\ './bin/phpunit': 'phpunit',
\ './vendor/bin/phpunit': 'phpunit',
\}(see vim-test documentation for where), and run :TestFile.