| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function testExportClosure(): void |
||
| 11 | { |
||
| 12 | $params = ['test' => 42]; |
||
| 13 | $closure = static function () use ($params) { |
||
| 14 | return $params['test']; |
||
| 15 | }; |
||
| 16 | |||
| 17 | $exportedClosure = Helper::exportVar($closure); |
||
| 18 | |||
| 19 | $this->assertSameWithoutLE("static function () use (\$params) {\n return \$params['test'];\n }", $exportedClosure); |
||
| 20 | } |
||
| 29 |