Skip to content

Commit

Permalink
Test invokable controller
Browse files Browse the repository at this point in the history
  • Loading branch information
leoralph committed Oct 31, 2024
1 parent 6899e04 commit 2c93503
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/Integration/Routing/MethodMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class MethodMiddlewareTest extends TestCase
{
public function test_method_middleware_is_respected()
{
$route = Route::get('/', [MethodMiddlewareTestController::class, 'index']);
$route = Route::get('/', MethodMiddlewareTestController::class);

$this->assertEquals(
$route->methodMiddleware(),
Expand All @@ -29,12 +29,10 @@ public function test_method_middleware_is_respected()
class MethodMiddlewareTestController
{
#[Authorize('viewAny', MethodMiddlewareTestController::class)]
public function index()
public function __invoke()
{
//
}


#[Authorize('view', 'param')]
public function show(MethodMiddlewareTestController $param)
{
Expand Down

0 comments on commit 2c93503

Please sign in to comment.