diff --git a/tests/ArrayFunctionCallTest.php b/tests/ArrayFunctionCallTest.php index 6abaf96ba68..a44a3cbfa5c 100644 --- a/tests/ArrayFunctionCallTest.php +++ b/tests/ArrayFunctionCallTest.php @@ -442,6 +442,31 @@ public function replace($a, $b): array '$d' => 'non-empty-array', ], ], + 'arrayReverseListDontPreserveKey' => [ + 'code' => ' [ + '$r' => 'list{0: bool|string, 1: bool|int|string, 2: false|float|int, 3: float|int, 4?: float|int, 5?: int}', + '$s' => 'list{0: int, 1: int, 2: int, 3?: int, 4?: int}', + ], + ], + 'arrayReverseListInt' => [ + 'code' => ' */ + function f(): array { return []; } + $a = array_reverse(f());', + 'assertions' => [ + '$a' => 'list', + ], + ], 'arrayReverseDontPreserveKeyExplicitArg' => [ 'code' => ' 4], false);',