diff options
author | Joas Schilling <coding@schilljs.com> | 2024-10-03 00:27:52 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-10-21 11:28:53 +0200 |
commit | c71097640a568662a07f5f28fb43e2675ab9afd4 (patch) | |
tree | 49ce7b4c6fa4add52d6a7d745beebedf484e7aa1 | |
parent | 91b9562bddf05c35c7f0f184341ec31df9045291 (diff) | |
download | nextcloud-server-c71097640a568662a07f5f28fb43e2675ab9afd4.tar.gz nextcloud-server-c71097640a568662a07f5f28fb43e2675ab9afd4.zip |
test: Fix mock creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | tests/Core/Command/User/SettingTest.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/Core/Command/User/SettingTest.php b/tests/Core/Command/User/SettingTest.php index 7be9bd27ecb..433348a8b98 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; } |