@@ 67-76 (lines=10) @@ | ||
64 | static::assertFalse($filter->matches(['test' => 'bar'])); |
|
65 | } |
|
66 | ||
67 | public function testFilterCanBeInvoked() |
|
68 | { |
|
69 | $filter = new AllOfFilter([ |
|
70 | new ClosureFilter('test', function ($actual) { |
|
71 | return $actual == 'value'; |
|
72 | }), |
|
73 | ]); |
|
74 | static::assertTrue(call_user_func($filter, ['test' => 'value'])); |
|
75 | static::assertFalse(call_user_func($filter, ['test' => 'values'])); |
|
76 | } |
|
77 | } |
|
78 |
@@ 69-78 (lines=10) @@ | ||
66 | static::assertTrue($filter->matches(['test' => 'bar'])); |
|
67 | } |
|
68 | ||
69 | public function testFilterCanBeInvoked() |
|
70 | { |
|
71 | $filter = new OneOfFilter([ |
|
72 | new ClosureFilter('test', function ($actual) { |
|
73 | return $actual == 'value'; |
|
74 | }), |
|
75 | ]); |
|
76 | static::assertTrue(call_user_func($filter, ['test' => 'value'])); |
|
77 | static::assertFalse(call_user_func($filter, ['test' => 'values'])); |
|
78 | } |
|
79 | } |
|
80 |