File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
tests/Integration/Routing Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,21 @@ public function testMiddlewareRunWhenRegisteredAsArrayOrParams()
46
46
$ this ->assertSame ('1_2 ' , $ this ->get ('before_after ' )->content ());
47
47
$ this ->assertSame ('1_2 ' , $ this ->get ('both_before ' )->content ());
48
48
$ this ->assertSame ('1_2 ' , $ this ->get ('both_after ' )->content ());
49
+ $ this ->assertSame ('1_2 ' , $ this ->get ('both_after ' )->content ());
50
+ }
51
+
52
+ public function testEmptyMiddlewareGroupAreHandledGracefully ()
53
+ {
54
+ $ controller = function () {
55
+ return 'Hello World ' ;
56
+ };
57
+
58
+ Route::middlewareGroup ('public ' , []);
59
+
60
+ Route::middleware ('public ' )
61
+ ->get ('public ' , $ controller );
62
+
63
+ $ this ->assertSame ('Hello World ' , $ this ->get ('public ' )->content ());
49
64
}
50
65
}
51
66
You can’t perform that action at this time.
0 commit comments