aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-10-03 00:27:52 +0200
committerJoas Schilling <coding@schilljs.com>2024-10-07 12:11:30 +0200
commit843f638315a6379e2fb896786e3f8465fb3134cf (patch)
tree017e8de1700634ca0e8b716ed074a01cb1cb8122 /tests
parentc109ae9437403c5bd17834c2ee53507c1d1f2ad2 (diff)
downloadnextcloud-server-843f638315a6379e2fb896786e3f8465fb3134cf.tar.gz
nextcloud-server-843f638315a6379e2fb896786e3f8465fb3134cf.zip
test: Fix mock creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Command/User/SettingTest.php7
1 files 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;
}