Skip to content

Commit

Permalink
add test for Filters with empty except
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jul 4, 2020
1 parent d027176 commit 51f53b0
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions tests/system/Filters/FiltersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
Expand Down

0 comments on commit 51f53b0

Please sign in to comment.