diff --git a/tests/ArrayAssignmentTest.php b/tests/ArrayAssignmentTest.php index 790f901b3..713756ad2 100644 --- a/tests/ArrayAssignmentTest.php +++ b/tests/ArrayAssignmentTest.php @@ -73,6 +73,20 @@ class ArrayAssignmentTest extends TestCase '$result===' => 'array{a::class: true, b::class: true}', ], ], + 'assignUnionOfLiteralsClassKeys2' => [ + 'code' => ' true]; + + foreach ([a::class, b::class] as $k) { + $result[$k] = true; + }', + 'assertions' => [ + '$result===' => 'array{a::class: true, b::class: true, c: true}', + ], + ], 'genericArrayCreationWithSingleIntValue' => [ 'code' => '