nixpkgs/home/programs/neovim/configuration/ftdetect/folder_typo3.vim

34 lines
1.2 KiB
VimL

augroup typo3Folder
autocmd!
autocmd BufEnter **/stuff/typo3/core/**/Unit/** execute "call Typo3SetupPhpUnitUnit()"
autocmd BufEnter **/stuff/typo3/core/**/Functional/** execute "call Typo3SetupPhpUnitFunctional()"
augroup END
function! Typo3SetupPhpUnitUnit()
let g:test#php#phpunit#options = {
\ 'file': '--configuration Build/phpunit/UnitTests.xml',
\ 'nearest': '--configuration Build/phpunit/UnitTests.xml',
\}
endfunction
function! Typo3SetupPhpUnitFunctional()
let g:test#php#phpunit#options = {
\ 'file': '--configuration Build/phpunit/FunctionalTests.xml',
\ 'nearest': '--configuration Build/phpunit/FunctionalTests.xml',
\}
endfunction
augroup typo3TestingFrameworkFolder
autocmd!
autocmd BufEnter **/stuff/typo3/testing-framework/Tests/Unit/** execute "call Typo3TestingFrameworkSetupPhpUnitUnit()"
augroup END
function! Typo3TestingFrameworkSetupPhpUnitUnit()
let g:test#php#phpunit#options = {
\ 'file': '--configuration Resources/Core/Build/UnitTests.xml',
\ 'nearest': '--configuration Resources/Core/Build/UnitTests.xml',
\}
let g:test#php#phpunit#executable = '.Build/bin/phpunit'
endfunction