]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/linter/test_phpcs.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '294584081929424aec883f90c7d6515b3743358d' as '.vim/bundle/vim-lsp-ale'
[etc/vim.git] / .vim / bundle / ale / test / linter / test_phpcs.vader
1 Before:
2   call ale#assert#SetUpLinterTest('php', 'phpcs')
3
4 After:
5   unlet! g:executable
6
7   call ale#assert#TearDownLinterTest()
8
9 Execute(The local phpcs executable should be used):
10   call ale#test#SetFilename('../test-files/phpcs/project-with-phpcs/foo/test.php')
11
12   let g:executable = ale#path#Simplify(g:dir . '/../test-files/phpcs/project-with-phpcs/vendor/bin/phpcs')
13
14   AssertLinterCwd '%s:h'
15   AssertLinter g:executable, ale#Escape(g:executable)
16   \ . ' -s --report=emacs --stdin-path=%s'
17
18 Execute(use_global should override local executable detection):
19   let g:ale_php_phpcs_use_global = 1
20
21   call ale#test#SetFilename('../test-files/phpcs/project-with-phpcs/foo/test.php')
22
23   AssertLinter 'phpcs', ale#Escape('phpcs')
24   \ . ' -s --report=emacs --stdin-path=%s'
25
26 Execute(Projects without local executables should use the global one):
27   call ale#test#SetFilename('../test-files/phpcs/project-without-phpcs/foo/test.php')
28
29   AssertLinter 'phpcs', ale#Escape('phpcs')
30   \ . ' -s --report=emacs --stdin-path=%s'
31
32 Execute(User provided options should be used):
33   let g:ale_php_phpcs_options = '--my-user-provided-option my-value'
34
35   AssertLinter 'phpcs', ale#Escape('phpcs')
36   \ . ' -s --report=emacs --stdin-path=%s --my-user-provided-option my-value'
37
38 Execute(The _standard option should be used):
39   let g:ale_php_phpcs_standard = 'foobar'
40
41   AssertLinter 'phpcs', ale#Escape('phpcs')
42   \ . ' -s --report=emacs --stdin-path=%s --standard=' . ale#Escape('foobar')