| Total Complexity | 2 | 
| Total Lines | 19 | 
| Duplicated Lines | 0 % | 
| Changes | 2 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 8 | class HelperTest extends TestCase | ||
| 9 | { | ||
| 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 | } | ||
| 21 | |||
| 22 | private function assertSameWithoutLE($expected, $actual, string $message = ''): void | ||
| 27 | } | ||
| 28 | } | ||
| 29 |