Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Dec 6, 2023
1 parent d3b7f3f commit 76458e0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/ArrayAssignmentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,20 @@ class b {}
'$result===' => 'array{a::class: true, b::class: true}',
],
],
'assignUnionOfLiteralsClassKeys2' => [
'code' => '<?php
class a {}
class b {}
$result = ["c" => true];
foreach ([a::class, b::class] as $k) {
$result[$k] = true;
}',
'assertions' => [
'$result===' => 'array{a::class: true, b::class: true, c: true}',
],
],
'genericArrayCreationWithSingleIntValue' => [
'code' => '<?php
$out = [];
Expand Down

0 comments on commit 76458e0

Please sign in to comment.