Skip to content

haginaga/vim-compiler-phpunit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

vim-compiler-phpunit

Make quickfix work fine with vim-test and phpunit

Setup

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.

References

About

Make quickfix work fine with vim-test and phpunit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published