mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-01-17 07:08:14 +01:00
Fix attrGroups/attributes confusion in EnumCase builder
Found by staabm in #907.
This commit is contained in:
parent
950bf8f1d1
commit
21a3e8cac5
@ -80,8 +80,8 @@ class EnumCase implements PhpParser\Builder {
|
|||||||
return new Stmt\EnumCase(
|
return new Stmt\EnumCase(
|
||||||
$this->name,
|
$this->name,
|
||||||
$this->value,
|
$this->value,
|
||||||
$this->attributes,
|
$this->attributeGroups,
|
||||||
$this->attributeGroups
|
$this->attributes
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@ class EnumCaseTest extends \PHPUnit\Framework\TestCase {
|
|||||||
new Stmt\EnumCase(
|
new Stmt\EnumCase(
|
||||||
"TEST",
|
"TEST",
|
||||||
null,
|
null,
|
||||||
|
[],
|
||||||
[
|
[
|
||||||
'comments' => [new Comment\Doc('/** Test */')]
|
'comments' => [new Comment\Doc('/** Test */')]
|
||||||
]
|
]
|
||||||
@ -49,7 +50,6 @@ class EnumCaseTest extends \PHPUnit\Framework\TestCase {
|
|||||||
new Stmt\EnumCase(
|
new Stmt\EnumCase(
|
||||||
"ATTR_GROUP",
|
"ATTR_GROUP",
|
||||||
null,
|
null,
|
||||||
[],
|
|
||||||
[$attributeGroup]
|
[$attributeGroup]
|
||||||
),
|
),
|
||||||
$node
|
$node
|
||||||
|
Loading…
x
Reference in New Issue
Block a user