Skip to content

Commit

Permalink
Test case for implicit loop context
Browse files Browse the repository at this point in the history
  • Loading branch information
AJenbo committed Sep 2, 2024
1 parent 0540a27 commit 146e44f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/Rules/BladeRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public static function provideData(): Iterator
['Variable $foos might not be defined.', 43],
['Binary operation "+" between string and 10 results in an error.', 49],
['Binary operation "+" between string and \'bar\' results in an error.', 49],
['Variable $foos might not be defined.', 45],
]];

yield [__DIR__ . '/Fixture/view-render-int.php', []];
Expand Down
2 changes: 2 additions & 0 deletions tests/Rules/Fixture/laravel-view-function.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@
];

view('foo', $fooBar);

view('foreach-include-loop');
3 changes: 3 additions & 0 deletions tests/Rules/templates/foreach-include-loop.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@foreach($foos as $value)
@include('loop')
@endforeach
1 change: 1 addition & 0 deletions tests/Rules/templates/loop.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ $value }}

0 comments on commit 146e44f

Please sign in to comment.