summaryrefslogtreecommitdiff
path: root/test/command_callback/test_phpmd_command_callbacks.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-07-15 18:24:53 +0100
committerw0rp <devw0rp@gmail.com>2018-07-15 18:28:28 +0100
commita42999a639b2916b769a85f37d037be314d9d61b (patch)
tree5ebfb4d357dc673efa93fd32a66b489c4510de40 /test/command_callback/test_phpmd_command_callbacks.vader
parent5155a35a80fe3b20659eb0f28cc6cc720532dd3f (diff)
downloadale-a42999a639b2916b769a85f37d037be314d9d61b.zip
Massively reduce the amount of code needed for linter tests
Diffstat (limited to 'test/command_callback/test_phpmd_command_callbacks.vader')
-rw-r--r--test/command_callback/test_phpmd_command_callbacks.vader16
1 files changed, 4 insertions, 12 deletions
diff --git a/test/command_callback/test_phpmd_command_callbacks.vader b/test/command_callback/test_phpmd_command_callbacks.vader
index 928b9771..64922820 100644
--- a/test/command_callback/test_phpmd_command_callbacks.vader
+++ b/test/command_callback/test_phpmd_command_callbacks.vader
@@ -1,20 +1,12 @@
Before:
- Save g:ale_php_phpmd_executable
-
- unlet! g:ale_php_phpmd_executable
-
- runtime ale_linters/php/phpmd.vim
+ call ale#assert#SetUpLinterTest('php', 'phpmd')
After:
- Restore
-
- call ale#linter#Reset()
+ call ale#assert#TearDownLinterTest()
Execute(Custom executables should be used for the executable and command):
let g:ale_php_phpmd_executable = 'phpmd_test'
- AssertEqual 'phpmd_test', ale_linters#php#phpmd#GetExecutable(bufnr(''))
- AssertEqual
+ AssertLinter 'phpmd_test',
\ ale#Escape('phpmd_test')
- \ . ' %s text cleancode,codesize,controversial,design,naming,unusedcode --ignore-violations-on-exit %t',
- \ ale_linters#php#phpmd#GetCommand(bufnr(''))
+ \ . ' %s text cleancode,codesize,controversial,design,naming,unusedcode --ignore-violations-on-exit %t'