Skip to content

Commit

Permalink
Merge pull request #165 from zds-s/added-test
Browse files Browse the repository at this point in the history
Optimise request->all() to clear the number subscripts when fetching
  • Loading branch information
zds-s authored Mar 4, 2024
2 parents 88f14bb + 688d947 commit b592f2f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/Setting/Controller/Settings/SystemConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/ModelControllerTest/Setting/Modules/ModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
use Nette\Utils\FileSystem;

/**
/*
* This file is part of MineAdmin.
*
* @see https://www.mineadmin.com
Expand Down
5 changes: 2 additions & 3 deletions tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit b592f2f

Please sign in to comment.