summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-05-14 22:58:58 +0100
committerw0rp <devw0rp@gmail.com>2019-05-14 22:58:58 +0100
commit4234d39d87c6cdd37eb5f52af58c0454b23843ca (patch)
tree9717ba114b4c13ec2257ec5e5e4db423d779ff3f /test/handler
parent381fe1badfe39283f28ca02e0b724e6d49ab23ff (diff)
downloadale-4234d39d87c6cdd37eb5f52af58c0454b23843ca.zip
Close #908 - Report phpcs problems as style problems
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_phpcs_handler.vader19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/handler/test_phpcs_handler.vader b/test/handler/test_phpcs_handler.vader
new file mode 100644
index 00000000..18accece
--- /dev/null
+++ b/test/handler/test_phpcs_handler.vader
@@ -0,0 +1,19 @@
+Before:
+ runtime ale_linters/php/phpcs.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(phpcs errors should be handled):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 18,
+ \ 'col': 3,
+ \ 'type': 'E',
+ \ 'sub_type': 'style',
+ \ 'text': 'Line indented incorrectly; expected 4 spaces, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)',
+ \ }],
+ \ ale_linters#php#phpcs#Handle(bufnr(''), [
+ \ '/path/to/some-filename.php:18:3: error - Line indented incorrectly; expected 4 spaces, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)',
+ \ ])