Make phpstan tests fail less

This commit is contained in:
w0rp 2019-05-13 14:00:12 +01:00
parent 42cbff29f8
commit c88ebc5e70
No known key found for this signature in database
GPG key ID: 0FC1ECAA8C81CD83

View file

@ -1,11 +1,24 @@
Before:
call delete('./phpstan.neon')
call ale#assert#SetUpLinterTest('php', 'phpstan')
let g:old_dir = g:dir
" Create a temporary directory and work within it, otherwise these tests
" cannot be run in parallel.
let g:dir = tempname()
call mkdir(g:dir, '', 0750)
silent! execute 'cd ' . fnameescape(g:dir)
silent! noautocmd execute 'file ' . fnameescape(ale#path#Simplify(g:dir . '/test.php'))
call delete('./phpstan.neon')
GivenCommandOutput ['0.10.2']
After:
call delete('./phpstan.neon')
silent! execute 'cd ' . fnameescape(g:old_dir)
call delete(g:dir, 'rf')
let g:dir = g:old_dir
unlet! g:old_dir
call ale#assert#TearDownLinterTest()
Execute(Custom executables should be used for the executable and command):