diff --git a/tests/Integration/Routing/MethodMiddlewareTest.php b/tests/Integration/Routing/MethodMiddlewareTest.php index 45cb492b4dc7..9d3ad49a51c1 100644 --- a/tests/Integration/Routing/MethodMiddlewareTest.php +++ b/tests/Integration/Routing/MethodMiddlewareTest.php @@ -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(), @@ -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) {