-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to tweak default scopes for accounts
Close #6582 Signed-off-by: Thomas Citharel <[email protected]>
- Loading branch information
Showing
4 changed files
with
63 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
/** | ||
* @author Björn Schießle <[email protected]> | ||
* @author Thomas Citharel <[email protected]> | ||
* | ||
* @copyright Copyright (c) 2016, ownCloud, Inc. | ||
* @license AGPL-3.0 | ||
|
@@ -25,6 +26,7 @@ | |
use OC\Accounts\AccountManager; | ||
use OCP\Accounts\IAccountManager; | ||
use OCP\BackgroundJob\IJobList; | ||
use OCP\IConfig; | ||
use OCP\ILogger; | ||
use OCP\IUser; | ||
use PHPUnit\Framework\MockObject\MockObject; | ||
|
@@ -55,12 +57,16 @@ class AccountsManagerTest extends TestCase { | |
/** @var ILogger|MockObject */ | ||
private $logger; | ||
|
||
/** @var IConfig|MockObject */ | ||
private $config; | ||
|
||
protected function setUp(): void { | ||
parent::setUp(); | ||
$this->eventDispatcher = $this->createMock(EventDispatcherInterface::class); | ||
$this->connection = \OC::$server->getDatabaseConnection(); | ||
$this->jobList = $this->createMock(IJobList::class); | ||
$this->logger = $this->createMock(ILogger::class); | ||
$this->config = $this->createMock(IConfig::class); | ||
} | ||
|
||
protected function tearDown(): void { | ||
|
@@ -77,7 +83,7 @@ protected function tearDown(): void { | |
*/ | ||
public function getInstance($mockedMethods = null) { | ||
return $this->getMockBuilder(AccountManager::class) | ||
->setConstructorArgs([$this->connection, $this->eventDispatcher, $this->jobList, $this->logger]) | ||
->setConstructorArgs([$this->connection, $this->eventDispatcher, $this->jobList, $this->logger, $this->config]) | ||
->setMethods($mockedMethods) | ||
->getMock(); | ||
} | ||
|