aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/User
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2021-10-25 14:54:42 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2021-11-23 09:29:00 +0100
commitcd72045433eafc8f73a620239dc5afa6a0a6d84d (patch)
tree0fa7b156008308d091d34105247ebc9831522616 /tests/lib/User
parent25fa0b8acd0c0304fb9b97072f705be1767c4772 (diff)
downloadnextcloud-server-cd72045433eafc8f73a620239dc5afa6a0a6d84d.tar.gz
nextcloud-server-cd72045433eafc8f73a620239dc5afa6a0a6d84d.zip
Make mock config return default value to fix warnings
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests/lib/User')
-rw-r--r--tests/lib/User/ManagerTest.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/lib/User/ManagerTest.php b/tests/lib/User/ManagerTest.php
index cfdecba9803..51a739994a6 100644
--- a/tests/lib/User/ManagerTest.php
+++ b/tests/lib/User/ManagerTest.php
@@ -667,7 +667,19 @@ class ManagerTest extends TestCase {
}
public function testDeleteUser() {
- $manager = new \OC\User\Manager($this->config, $this->oldDispatcher, $this->cacheFactory, $this->eventDispatcher);
+ $config = $this->getMockBuilder(AllConfig::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $config
+ ->expects($this->any())
+ ->method('getUserValue')
+ ->willReturnArgument(3);
+ $config
+ ->expects($this->any())
+ ->method('getAppValue')
+ ->willReturnArgument(2);
+
+ $manager = new \OC\User\Manager($config, $this->oldDispatcher, $this->cacheFactory, $this->eventDispatcher);
$backend = new \Test\Util\User\Dummy();
$manager->registerBackend($backend);