summaryrefslogtreecommitdiff
path: root/test/handler/test_php_phan_handler.vader
diff options
context:
space:
mode:
authorDiego Oliveira <contato@diegoholiveira.com>2017-10-24 19:25:02 -0200
committerw0rp <w0rp@users.noreply.github.com>2017-10-24 22:25:02 +0100
commitb172cd8b17a8d9f0573e75211963e59b37ad5c34 (patch)
treec316cedc4171028ec03160e1c6299a2dce168670 /test/handler/test_php_phan_handler.vader
parentc248885e5790ce81018ddc8f8afbc3c173051059 (diff)
downloadale-b172cd8b17a8d9f0573e75211963e59b37ad5c34.zip
Add phan as a linter for php files (#1026)
Add phan for checking PHP code
Diffstat (limited to 'test/handler/test_php_phan_handler.vader')
-rw-r--r--test/handler/test_php_phan_handler.vader24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/handler/test_php_phan_handler.vader b/test/handler/test_php_phan_handler.vader
new file mode 100644
index 00000000..68ed6d06
--- /dev/null
+++ b/test/handler/test_php_phan_handler.vader
@@ -0,0 +1,24 @@
+Before:
+ runtime ale_linters/php/phan.vim
+
+Execute(The php static analyzer handler should parse errors from phan):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 25,
+ \ 'type': 'W',
+ \ 'text': 'Return type of getValidator is undeclared type \Respect\Validation\Validator',
+ \ },
+ \ {
+ \ 'lnum': 66,
+ \ 'type': 'W',
+ \ 'text': 'Call to method string from undeclared class \Respect\Validation\Validator',
+ \ },
+ \ ],
+ \ ale_linters#php#phan#Handle(347, [
+ \ "example.php:25 PhanUndeclaredTypeReturnType Return type of getValidator is undeclared type \\Respect\\Validation\\Validator",
+ \ "example.php:66 PhanUndeclaredClassMethod Call to method string from undeclared class \\Respect\\Validation\\Validator",
+ \ ])
+
+After:
+ call ale#linter#Reset()