mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 08:16:43 -04:00
test: Fix mock creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
91b9562bdd
commit
c71097640a
1 changed files with 3 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue