Skip to content

Commit

Permalink
Merge pull request #90 from tighten/adc/tlint-tests
Browse files Browse the repository at this point in the history
Add additional TLint tests
  • Loading branch information
driftingly authored Mar 11, 2023
2 parents e8484ec + 6f4e539 commit 35d7f41
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
Binary file modified builds/duster
Binary file not shown.
2 changes: 1 addition & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
|
*/

'version' => '1.0.2',
'version' => '1.0.3',

/*
|--------------------------------------------------------------------------
Expand Down
12 changes: 12 additions & 0 deletions tests/Feature/LintCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@
->toContain('Put a space between blade control structure names and the opening paren:`@if(` -> `@if (`');
});

it('lints with TLint when path contains space', function () {
[$statusCode, $output] = run('lint', [
'path' => base_path('tests/Fixtures/TlintFixableIssues/file with spaces.blade.php'),
'--using' => 'tlint',
]);

expect($statusCode)->toBe(1)
->and($output)
->toContain('Linting using TLint')
->toContain('Put a space between blade control structure names and the opening paren:`@if(` -> `@if (`');
});

it('only lints with TLint', function () {
[$statusCode, $output] = run('lint', [
'path' => base_path('tests/Fixtures/TlintFixableIssues'),
Expand Down
3 changes: 3 additions & 0 deletions tests/Fixtures/TlintFixableIssues/file with spaces.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@if($testing)
<span>Testing</span>
@endif

0 comments on commit 35d7f41

Please sign in to comment.