summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJose Soto <josecanhelp@gmail.com>2020-11-21 12:29:33 -0800
committerGitHub <noreply@github.com>2020-11-21 20:29:33 +0000
commite1184e31f6ed7907b0fdc51eaf4507af6f22d7d9 (patch)
treed7fc9d0a9f6b30ffaf586babc06f9fc7131cd745 /test
parent96428425fe9ce8c5fa0718af2c6fe58deb61fadc (diff)
downloadale-e1184e31f6ed7907b0fdc51eaf4507af6f22d7d9.zip
Adds support for Tlint - A Tighten Opinionated PHP Linter (#3291)
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_tlint_handler.vader34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/handler/test_tlint_handler.vader b/test/handler/test_tlint_handler.vader
new file mode 100644
index 00000000..e146346c
--- /dev/null
+++ b/test/handler/test_tlint_handler.vader
@@ -0,0 +1,34 @@
+Before:
+ runtime ale_linters/php/tlint.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(The tlint handler should calculate line numbers):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': '5',
+ \ 'col': 0,
+ \ 'sub_type':
+ \ 'style',
+ \ 'type': 'W',
+ \ 'text': ['! There should be no unused imports.', 'There should be no unused imports.', '', '', '', '', '', '', '', '']
+ \ },
+ \ {
+ \ 'lnum': '15',
+ \ 'col': 0,
+ \ 'sub_type':
+ \ 'style',
+ \ 'type': 'W',
+ \ 'text': ['! There should be no method visibility in test methods.', 'There should be no method visibility in test methods.', '', '', '', '', '', '', '', '']
+ \ },
+ \ ],
+ \ ale_linters#php#tlint#Handle(347, [
+ \ "Lints for /Users/jose/Code/Tighten/tester/tests/Unit/ExampleTest.php",
+ \ "============",
+ \ "! There should be no unused imports.",
+ \ "5 : `use Illuminate\Foundation\Testing\RefreshDatabase;`",
+ \ "! There should be no method visibility in test methods.",
+ \ "15 : ` public function testBasicTest()`",
+ \ ])