From 51f53b0ac3f1f5bb117734d9db7952eaf532b287 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 4 Jul 2020 09:15:24 +0700 Subject: [PATCH] add test for Filters with empty except --- tests/system/Filters/FiltersTest.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/system/Filters/FiltersTest.php b/tests/system/Filters/FiltersTest.php index 0ce7edd08c45..8118a4af6648 100644 --- a/tests/system/Filters/FiltersTest.php +++ b/tests/system/Filters/FiltersTest.php @@ -143,14 +143,29 @@ public function testProcessMethodProcessGlobals() //-------------------------------------------------------------------- - public function testProcessMethodProcessGlobalsWithExcept() + public function provideExcept() + { + return [ + [ + ['admin/*'], + ], + [ + [], + ], + ]; + } + + /** + * @dataProvider provideExcept + */ + public function testProcessMethodProcessGlobalsWithExcept(array $except) { $_SERVER['REQUEST_METHOD'] = 'GET'; $config = [ 'globals' => [ 'before' => [ - 'foo' => ['except' => ['admin/*']], + 'foo' => ['except' => $except], 'bar' ], 'after' => [