File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -639,6 +639,40 @@ public function testBeforeExceptInapplicable(): void
639639 $ this ->assertSame ($ expected , $ filters ->initialize ($ uri )->getFilters ());
640640 }
641641
642+ public function testBeforeExceptEmptyArray (): void
643+ {
644+ $ _SERVER ['REQUEST_METHOD ' ] = 'GET ' ;
645+
646+ $ config = [
647+ 'aliases ' => [
648+ 'foo ' => '' ,
649+ 'bar ' => '' ,
650+ 'baz ' => '' ,
651+ ],
652+ 'globals ' => [
653+ 'before ' => [
654+ 'foo ' => ['except ' => []],
655+ 'bar ' ,
656+ ],
657+ 'after ' => [
658+ 'baz ' ,
659+ ],
660+ ],
661+ ];
662+ $ filtersConfig = $ this ->createConfigFromArray (FiltersConfig::class, $ config );
663+ $ filters = $ this ->createFilters ($ filtersConfig );
664+
665+ $ uri = 'admin/foo/bar ' ;
666+ $ expected = [
667+ 'before ' => [
668+ 'foo ' ,
669+ 'bar ' ,
670+ ],
671+ 'after ' => ['baz ' ],
672+ ];
673+ $ this ->assertSame ($ expected , $ filters ->initialize ($ uri )->getFilters ());
674+ }
675+
642676 public function testAfterExceptString (): void
643677 {
644678 $ _SERVER ['REQUEST_METHOD ' ] = 'GET ' ;
You can’t perform that action at this time.
0 commit comments