We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ea30bf commit f540b0dCopy full SHA for f540b0d
tests/system/Router/RouteCollectionTest.php
@@ -440,6 +440,22 @@ static function ($routes): void {
440
$this->assertSame($expected, $routes->getRoutesOptions());
441
}
442
443
+ public function testGroupFilterAndRouteFilter(): void
444
+ {
445
+ $routes = $this->getCollector();
446
+
447
+ $routes->group('admin', ['filter' => ['csrf']], static function ($routes): void {
448
+ $routes->get('profile', 'Admin\Profile::index', ['filter' => ['honeypot']]);
449
+ });
450
451
+ $expected = [
452
+ 'admin/profile' => [
453
+ 'filter' => ['csrf', 'honeypot'],
454
+ ],
455
+ ];
456
+ $this->assertSame($expected, $routes->getRoutesOptions());
457
+ }
458
459
public function testGroupingWorksWithEmptyStringPrefix(): void
460
{
461
$routes = $this->getCollector();
0 commit comments