| Total Complexity | 3 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class HelperTest extends TestCase |
||
| 10 | { |
||
| 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 | } |
||
| 22 | |||
| 23 | private function assertSameWithoutLE($expected, $actual, string $message = ''): void |
||
| 28 | } |
||
| 29 | |||
| 30 | public function testFixRemoveArrayKeys() |
||
| 49 |