diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-05-13 12:56:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 12:56:39 +0200 |
commit | 9fcf53115433471ddcef6b28bf460642b7f6c8a3 (patch) | |
tree | 0ae43becb41d3e0af108b34cbaf7261966eca134 /tests | |
parent | fe33e9c08cbbc80738660d2d78838f04d24e0e2e (diff) | |
parent | e71db404923f8c8b53e7968f8a10d3e7de0abe2a (diff) | |
download | nextcloud-server-9fcf53115433471ddcef6b28bf460642b7f6c8a3.tar.gz nextcloud-server-9fcf53115433471ddcef6b28bf460642b7f6c8a3.zip |
Merge pull request #30863 from nextcloud/performance/saving-user-profile-info
Minor optimizations for saving user personal information
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Accounts/AccountManagerTest.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/lib/Accounts/AccountManagerTest.php b/tests/lib/Accounts/AccountManagerTest.php index 9d54ef36c80..69deaf17d3c 100644 --- a/tests/lib/Accounts/AccountManagerTest.php +++ b/tests/lib/Accounts/AccountManagerTest.php @@ -424,7 +424,7 @@ class AccountManagerTest extends TestCase { ], ]; foreach ($users as $userInfo) { - $this->invokePrivate($this->accountManager, 'updateUser', [$userInfo['user'], $userInfo['data'], false]); + $this->invokePrivate($this->accountManager, 'updateUser', [$userInfo['user'], $userInfo['data'], null, false]); } } @@ -466,9 +466,6 @@ class AccountManagerTest extends TestCase { /** @var IUser $user */ $user = $this->createMock(IUser::class); - // FIXME: should be an integration test instead of this abomination - $accountManager->expects($this->once())->method('getUser')->with($user)->willReturn($oldData); - if ($updateExisting) { $accountManager->expects($this->once())->method('updateExistingUser') ->with($user, $newData); @@ -497,10 +494,10 @@ class AccountManagerTest extends TestCase { ); } - $this->invokePrivate($accountManager, 'updateUser', [$user, $newData]); + $this->invokePrivate($accountManager, 'updateUser', [$user, $newData, $oldData]); } - public function dataTrueFalse() { + public function dataTrueFalse(): array { return [ #$newData | $oldData | $insertNew | $updateExisting [['myProperty' => ['value' => 'newData']], ['myProperty' => ['value' => 'oldData']], false, true], |