| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function testForEach() |
||
| 11 | { |
||
| 12 | $list = [1, 2, 3]; |
||
| 13 | $mockFn = $this->createPartialMock(\stdClass::class, ['__invoke']); |
||
| 14 | $mockFn->expects($this->exactly(3)) |
||
| 15 | ->method('__invoke') |
||
| 16 | ->with($this->callback(function ($it) use ($list) { |
||
| 17 | return in_array($it, $list); |
||
| 18 | })); |
||
| 19 | |||
| 20 | arrayForEach($mockFn)($list); |
||
| 21 | } |
||
| 23 |