From cd72045433eafc8f73a620239dc5afa6a0a6d84d Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 25 Oct 2021 14:54:42 +0200 Subject: Make mock config return default value to fix warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- tests/lib/User/ManagerTest.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests/lib/User') 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); -- cgit v1.2.3