diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/handler/test_phpcs_handler.vader | 19 | ||||
-rw-r--r-- | test/test_phpcs_include_code.vader | 7 |
2 files changed, 19 insertions, 7 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)', + \ ]) diff --git a/test/test_phpcs_include_code.vader b/test/test_phpcs_include_code.vader deleted file mode 100644 index 1cff1916..00000000 --- a/test/test_phpcs_include_code.vader +++ /dev/null @@ -1,7 +0,0 @@ -Execute(errors should include code): - AssertEqual - \ [{'lnum': 18, 'col': 3, 'type': 'E', '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)', - \ ]) - |