From c7b9e1eebbfa43bf78bc3828a638510a67c9c49a Mon Sep 17 00:00:00 2001 From: hirokinoue <70567194+hirokinoue@users.noreply.github.com> Date: Thu, 28 Apr 2022 23:18:39 +0900 Subject: [PATCH] add test case for shuffle() --- tests/ArrayFunctionCallTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/ArrayFunctionCallTest.php b/tests/ArrayFunctionCallTest.php index efd2fcf6219..4d2a3732ba8 100644 --- a/tests/ArrayFunctionCallTest.php +++ b/tests/ArrayFunctionCallTest.php @@ -1762,9 +1762,12 @@ function getCharPairs(string $line) : array { 'shuffle' => [ ' 123, "bar" => 456]; - shuffle($array);', + shuffle($array); + $emptyArray = []; + shuffle($emptyArray);', 'assertions' => [ - '$array' => 'list', + '$array' => 'non-empty-list', + '$emptyArray' => 'list', ], ], 'sort' => [