From 139948e774479660bbc1bb2c15f2c26c3c55c966 Mon Sep 17 00:00:00 2001 From: hirokinoue <70567194+hirokinoue@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:33:08 +0900 Subject: [PATCH] add test case for uksort() --- tests/ArrayFunctionCallTest.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/ArrayFunctionCallTest.php b/tests/ArrayFunctionCallTest.php index eb26e202c..69bcf140b 100644 --- a/tests/ArrayFunctionCallTest.php +++ b/tests/ArrayFunctionCallTest.php @@ -687,15 +687,22 @@ class ArrayFunctionCallTest extends TestCase ], 'uksort' => [ ' $b; + } $array = ["b" => 1, "a" => 2]; uksort( $array, - function (string $a, string $b) { - return $a <=> $b; - } + "foo" + ); + $emptyArray = []; + uksort( + $emptyArray, + "foo" );', 'assertions' => [ - '$array' => 'array', + '$array' => 'non-empty-array', + '$emptyArray' => 'array', ], ], 'arrayMergeTKeyedArray' => [