From 688d947af8f44e7fceccc292648ef2e99c6813e4 Mon Sep 17 00:00:00 2001 From: Death-Satan <49744633+Death-Satan@users.noreply.github.com> Date: Mon, 4 Mar 2024 11:05:21 +0800 Subject: [PATCH] Fixed --- app/Setting/Controller/Settings/SystemConfigController.php | 2 +- tests/ModelControllerTest/Setting/Modules/ModuleTest.php | 2 +- tests/Pest.php | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Setting/Controller/Settings/SystemConfigController.php b/app/Setting/Controller/Settings/SystemConfigController.php index 1418f926..f7c6a8db 100644 --- a/app/Setting/Controller/Settings/SystemConfigController.php +++ b/app/Setting/Controller/Settings/SystemConfigController.php @@ -79,7 +79,7 @@ public function update(SettingConfigRequest $request): ResponseInterface #[PostMapping('updateByKeys'), Permission('setting:config:update'), OperationLog] public function updateByKeys(): ResponseInterface { - return $this->service->updatedByKeys($this->request->all()) ? $this->success() : $this->error(); + return $this->service->updatedByKeys($this->request->post()) ? $this->success() : $this->error(); } /** diff --git a/tests/ModelControllerTest/Setting/Modules/ModuleTest.php b/tests/ModelControllerTest/Setting/Modules/ModuleTest.php index e3112a8e..1e23ed53 100644 --- a/tests/ModelControllerTest/Setting/Modules/ModuleTest.php +++ b/tests/ModelControllerTest/Setting/Modules/ModuleTest.php @@ -11,7 +11,7 @@ */ use Nette\Utils\FileSystem; -/** +/* * This file is part of MineAdmin. * * @see https://www.mineadmin.com diff --git a/tests/Pest.php b/tests/Pest.php index bf5c6208..6c657de4 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -13,7 +13,6 @@ use Hyperf\Context\ApplicationContext; use Hyperf\DbConnection\Db; use Hyperf\Di\Aop\ProceedingJoinPoint; -use Hyperf\Stringable\Str; use HyperfTests\HttpTestCase; use HyperfTests\MineControllerTestCase; use Mine\Aspect\OperationLogAspect; @@ -49,8 +48,8 @@ function testFailResponse(mixed $result) ->beforeEach(function () { // Create Super Administrator Db::table('system_user')->truncate(); - $this->password = Str::random(8); - $this->username = Str::random(10); + $this->password = '123456'; + $this->username = 'admin'; SystemUser::whereKey(env('SUPER_ADMIN', 1))->delete(); $this->mock = SystemUser::create([ 'id' => env('SUPER_ADMIN', 1),