Skip to content

Commit a4d3b4f

Browse files
author
matt
committed
Test to reproduce nette#143
1 parent a184ff7 commit a4d3b4f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/PhpGenerator/Extractor.extractAll.vars.phpt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ $file = (new Extractor(<<<'XX'
2323
public $array = [1, 2, ['x' => [3]], ...self::Foo];
2424
public $concat = 'x' . 'y';
2525
public $math = 10 * 3;
26+
public $constKey = [self::class => 'foo'];
2627
2728
public function foo($a = [1, 2, 3], $b = new stdClass(1, 2))
2829
{
@@ -70,3 +71,7 @@ Assert::equal(
7071
new Literal('new /*(n*/\stdClass(1, 2)'),
7172
$method->getParameter('b')->getDefaultValue(),
7273
);
74+
Assert::equal(
75+
['\Class1::class' => 'foo'],
76+
$method->getParameter('constKey')->getDefaultValue(),
77+
);

0 commit comments

Comments
 (0)