Skip to content

Commit

Permalink
Add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Dec 19, 2022
1 parent 4fb5a61 commit 194f710
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/ArrayAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,21 @@ public function providerValidCodeParse(): iterable
'$list===' => "list{0: 'A'|'B'|'C', 1?: 'C'}",
],
],
'testBuildList3' => [
'code' => '<?php
$a = [0];
if (random_int(0, 1)) {
$a []= 1;
}
if (random_int(0, 1)) {
$a []= 2;
}
$a []= 3;
',
'assertions' => [
'$list===' => "list{0: 0, 1: 1|2|3, 2?: 2|3, 3?: 3}",
],
],
'instanceOfStringOffset' => [
'code' => '<?php
class A {
Expand Down

0 comments on commit 194f710

Please sign in to comment.