| @@ 90-99 (lines=10) @@ | ||
| 87 | static::assertFalse($filter(['tests' => 'values'])); |
|
| 88 | } |
|
| 89 | ||
| 90 | public function testAllOfFilterCanBeInvoked() |
|
| 91 | { |
|
| 92 | $filter = new AllOfFilter([ |
|
| 93 | new ClosureFilter('test', function ($actual) { |
|
| 94 | return $actual == 'value'; |
|
| 95 | }), |
|
| 96 | ]); |
|
| 97 | static::assertTrue(call_user_func($filter, ['test' => 'value'])); |
|
| 98 | static::assertFalse(call_user_func($filter, ['test' => 'values'])); |
|
| 99 | } |
|
| 100 | } |
|
| 101 | ||
| @@ 92-101 (lines=10) @@ | ||
| 89 | static::assertFalse($filter(['tests' => 'values'])); |
|
| 90 | } |
|
| 91 | ||
| 92 | public function testOneOfFilterCanBeInvoked() |
|
| 93 | { |
|
| 94 | $filter = new OneOfFilter([ |
|
| 95 | new ClosureFilter('test', function ($actual) { |
|
| 96 | return $actual == 'value'; |
|
| 97 | }), |
|
| 98 | ]); |
|
| 99 | static::assertTrue(call_user_func($filter, ['test' => 'value'])); |
|
| 100 | static::assertFalse(call_user_func($filter, ['test' => 'values'])); |
|
| 101 | } |
|
| 102 | } |
|
| 103 | ||