From 649a90ca0e0a5e08c698c52e5f387fb6bb09e3c2 Mon Sep 17 00:00:00 2001 From: gzydong <837215079@qq.com> Date: Sun, 29 Aug 2021 22:12:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Helper/ArrayHelper.php | 1 - test/Cases/Helper/ArrayHelperTest.php | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 test/Cases/Helper/ArrayHelperTest.php diff --git a/app/Helper/ArrayHelper.php b/app/Helper/ArrayHelper.php index 781aca3..fb776fd 100644 --- a/app/Helper/ArrayHelper.php +++ b/app/Helper/ArrayHelper.php @@ -3,7 +3,6 @@ declare(strict_types=1); namespace App\Helper; - class ArrayHelper { /** diff --git a/test/Cases/Helper/ArrayHelperTest.php b/test/Cases/Helper/ArrayHelperTest.php new file mode 100644 index 0000000..8c5549c --- /dev/null +++ b/test/Cases/Helper/ArrayHelperTest.php @@ -0,0 +1,18 @@ +assertTrue(!ArrayHelper::isRelationArray([1, 2, 3, 4, 5]), '判断是否是关联数组失败1!'); + $this->assertTrue(ArrayHelper::isRelationArray([1, 6 => 2, 3, 4, 5]), '判断是否是关联数组失败2!'); + $this->assertTrue(ArrayHelper::isRelationArray(['k1' => 'test', 'k2' => 'test2']), '判断是否是关联数组失败3!'); + } +}