From 843f638315a6379e2fb896786e3f8465fb3134cf Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 3 Oct 2024 00:27:52 +0200 Subject: [PATCH] test: Fix mock creation Signed-off-by: Joas Schilling --- tests/Core/Command/User/SettingTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/Core/Command/User/SettingTest.php b/tests/Core/Command/User/SettingTest.php index 6848b0bb350..95d1c192b81 100644 --- a/tests/Core/Command/User/SettingTest.php +++ b/tests/Core/Command/User/SettingTest.php @@ -49,15 +49,14 @@ class SettingTest extends TestCase { public function getCommand(array $methods = []) { if (empty($methods)) { - return new Setting($this->userManager, $this->config, $this->connection); + return new Setting($this->userManager, $this->config); } else { - $mock = $this->getMockBuilder('OC\Core\Command\User\Setting') + $mock = $this->getMockBuilder(Setting::class) ->setConstructorArgs([ $this->userManager, $this->config, - $this->connection, ]) - ->setMethods($methods) + ->onlyMethods($methods) ->getMock(); return $mock; }