Skip to content

Commit

Permalink
Test to reproduce #143
Browse files Browse the repository at this point in the history
  • Loading branch information
matt committed Oct 26, 2023
1 parent a184ff7 commit cf3d118
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/PhpGenerator/Extractor.extractAll.vars.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ $file = (new Extractor(<<<'XX'
public $array = [1, 2, ['x' => [3]], ...self::Foo];
public $concat = 'x' . 'y';
public $math = 10 * 3;
public $constKey = [self::class => 'foo'];
public function foo($a = [1, 2, 3], $b = new stdClass(1, 2))
{
Expand Down Expand Up @@ -70,3 +71,7 @@ Assert::equal(
new Literal('new /*(n*/\stdClass(1, 2)'),
$method->getParameter('b')->getDefaultValue(),
);
Assert::equal(
[new Literal('self::class') => 'foo'],
$method->getParameter('constKey')->getDefaultValue(),
);

0 comments on commit cf3d118

Please sign in to comment.