test: Fix mock creation

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/48539/head
Joas Schilling 2 months ago
parent c109ae9437
commit 843f638315
No known key found for this signature in database
GPG Key ID: F72FA5B49FFA96B0
  1. 7
      tests/Core/Command/User/SettingTest.php

@ -49,15 +49,14 @@ class SettingTest extends TestCase {
public function getCommand(array $methods = []) { public function getCommand(array $methods = []) {
if (empty($methods)) { if (empty($methods)) {
return new Setting($this->userManager, $this->config, $this->connection); return new Setting($this->userManager, $this->config);
} else { } else {
$mock = $this->getMockBuilder('OC\Core\Command\User\Setting') $mock = $this->getMockBuilder(Setting::class)
->setConstructorArgs([ ->setConstructorArgs([
$this->userManager, $this->userManager,
$this->config, $this->config,
$this->connection,
]) ])
->setMethods($methods) ->onlyMethods($methods)
->getMock(); ->getMock();
return $mock; return $mock;
} }

Loading…
Cancel
Save