diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Accounts/AccountManagerTest.php | 9 | ||||
-rw-r--r-- | tests/lib/Files/Config/UserMountCacheTest.php | 3 |
2 files changed, 5 insertions, 7 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], diff --git a/tests/lib/Files/Config/UserMountCacheTest.php b/tests/lib/Files/Config/UserMountCacheTest.php index f4c6a427abd..221159bc983 100644 --- a/tests/lib/Files/Config/UserMountCacheTest.php +++ b/tests/lib/Files/Config/UserMountCacheTest.php @@ -11,6 +11,7 @@ namespace Test\Files\Config; use OC\DB\QueryBuilder\Literal; use OC\Files\Mount\MountPoint; use OC\Files\Storage\Storage; +use OC\Cache\CappedMemoryCache; use OC\User\Manager; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Config\ICachedMountInfo; @@ -114,7 +115,7 @@ class UserMountCacheTest extends TestCase { } private function clearCache() { - $this->invokePrivate($this->cache, 'mountsForUsers', [[]]); + $this->invokePrivate($this->cache, 'mountsForUsers', [new CappedMemoryCache()]); } public function testNewMounts() { |