Skip to content

Commit

Permalink
Add missing colon for index method for web controllers (#638)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Faust authored May 12, 2023
1 parent 1722216 commit 7daf8e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Lexers/ControllerLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private function resourceTokens()
return [
'index' => [
'query' => 'all:[plural]',
'render' => '[singular].index with [plural]',
'render' => '[singular].index with:[plural]',
],
'create' => [
'render' => '[singular].create',
Expand Down
8 changes: 4 additions & 4 deletions tests/Feature/Lexers/ControllerLexerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function it_returns_controllers(): void
'PostController' => [
'index' => [
'query' => 'all:posts',
'render' => 'post.index with posts',
'render' => 'post.index with:posts',
],
'show' => [
'find' => 'id',
Expand All @@ -63,7 +63,7 @@ public function it_returns_controllers(): void
$this->statementLexer->shouldReceive('analyze')
->with([
'query' => 'all:posts',
'render' => 'post.index with posts',
'render' => 'post.index with:posts',
])
->andReturn(['index-statement-1', 'index-statement-2']);

Expand Down Expand Up @@ -120,7 +120,7 @@ public function it_returns_a_web_resource_controller(): void
$this->statementLexer->shouldReceive('analyze')
->with([
'query' => 'all:comments',
'render' => 'comment.index with comments',
'render' => 'comment.index with:comments',
])
->andReturn(['index-statements']);

Expand Down Expand Up @@ -265,7 +265,7 @@ public function it_returns_a_specific_resource_controller(): void
$this->statementLexer->expects('analyze')
->with([
'query' => 'all:users',
'render' => 'user.index with users',
'render' => 'user.index with:users',
])
->andReturn(['index-statements']);

Expand Down

0 comments on commit 7daf8e8

Please sign in to comment.