summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-04-23 10:44:49 +0200
committerMorris Jobke <hey@morrisjobke.de>2018-04-23 13:49:28 +0200
commit093cd01ac27be9f081af04886f721ba2589ba445 (patch)
treece93ceb4f0b65102fc39a0e03342de98f43bd0e4 /apps/federatedfilesharing/tests
parent3ff041f86d936524674d2def257ddc4b15a2c105 (diff)
downloadnextcloud-server-093cd01ac27be9f081af04886f721ba2589ba445.tar.gz
nextcloud-server-093cd01ac27be9f081af04886f721ba2589ba445.zip
Fix DI for federated file sharing controller
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/federatedfilesharing/tests')
-rw-r--r--apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
index d76f93751a4..cb535f33c60 100644
--- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
+++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
@@ -38,6 +38,7 @@ use OCP\Http\Client\IClient;
use OCP\Http\Client\IClientService;
use OCP\Http\Client\IResponse;
use OCP\IConfig;
+use OCP\ILogger;
use OCP\IUserManager;
use OCP\Share\IShare;
@@ -79,6 +80,9 @@ class RequestHandlerControllerTest extends TestCase {
/** @var ICloudIdManager */
private $cloudIdManager;
+ /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ private $logger;
+
protected function setUp() {
parent::setUp();
@@ -103,6 +107,8 @@ class RequestHandlerControllerTest extends TestCase {
$this->cloudIdManager = new CloudIdManager();
+ $this->logger = $this->createMock(ILogger::class);
+
$this->s2s = new RequestHandlerController(
'federatedfilesharing',
\OC::$server->getRequest(),
@@ -112,7 +118,8 @@ class RequestHandlerControllerTest extends TestCase {
$this->notifications,
$this->addressHandler,
$this->userManager,
- $this->cloudIdManager
+ $this->cloudIdManager,
+ $this->logger
);
$this->connection = \OC::$server->getDatabaseConnection();
@@ -177,7 +184,8 @@ class RequestHandlerControllerTest extends TestCase {
$this->notifications,
$this->addressHandler,
$this->userManager,
- $this->cloudIdManager
+ $this->cloudIdManager,
+ $this->logger,
]
)->setMethods(['executeDeclineShare', 'verifyShare'])->getMock();