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