| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 54 | public function testShouldTriggerInitEvent(): void |
||
| 55 | { |
||
| 56 | $initTriggered = false; |
||
| 57 | |||
| 58 | // adding some listeners |
||
| 59 | $this->listenerProvider->attach(function (BeforeRun $event) use (&$initTriggered) { |
||
| 60 | $initTriggered = true; |
||
| 61 | }); |
||
| 62 | |||
| 63 | ob_start(); |
||
| 64 | ob_implicit_flush(0); |
||
| 65 | |||
| 66 | Block::begin()->init(); |
||
| 67 | Block::end(); |
||
| 68 | |||
| 69 | ob_get_clean(); |
||
| 70 | |||
| 71 | $this->assertTrue($initTriggered); |
||
| 72 | } |
||
| 74 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.