summaryrefslogtreecommitdiff
path: root/test/handler/test_php_psalm_handler.vader
diff options
context:
space:
mode:
authorRichard Marmorstein <twitchard@users.noreply.github.com>2018-09-27 11:48:47 -0400
committerw0rp <w0rp@users.noreply.github.com>2018-09-27 16:48:47 +0100
commit947360f714cac48cff1b3e1949b1b66b48be671e (patch)
tree75df21f7327ba0a376727f28cb2f7444d3cde391 /test/handler/test_php_psalm_handler.vader
parent58ceb21cbc10a05f376664da31c8d7621e6d3669 (diff)
downloadale-947360f714cac48cff1b3e1949b1b66b48be671e.zip
Add psalm linter for PHP (#1893)
Diffstat (limited to 'test/handler/test_php_psalm_handler.vader')
-rw-r--r--test/handler/test_php_psalm_handler.vader24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/handler/test_php_psalm_handler.vader b/test/handler/test_php_psalm_handler.vader
new file mode 100644
index 00000000..fd62a467
--- /dev/null
+++ b/test/handler/test_php_psalm_handler.vader
@@ -0,0 +1,24 @@
+Before:
+ runtime ale_linters/php/psalm.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(The php static analyzer handler should parse errors from psalm):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 1,
+ \ 'type': 'W',
+ \ 'text': 'somewarning',
+ \ },
+ \ {
+ \ 'lnum': 11,
+ \ 'type': 'E',
+ \ 'text': 'someerror',
+ \ },
+ \ ],
+ \ ale_linters#php#psalm#Handle(347, [
+ \ "/file:1:3:warning - somewarning",
+ \ "/file:11:33:error - someerror",
+ \ ])