summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-03-13 00:42:39 +0100
committerMorris Jobke <hey@morrisjobke.de>2019-03-13 00:42:39 +0100
commit389c2095a6130f16f02ca72e09712596e0e48551 (patch)
treef59f8c567b3a1300dfec7ef215d9736387bb98ac /apps/dav/tests
parent9bb13fb05fffe9af94f1e57866a025382b71f5a4 (diff)
downloadnextcloud-server-389c2095a6130f16f02ca72e09712596e0e48551.tar.gz
nextcloud-server-389c2095a6130f16f02ca72e09712596e0e48551.zip
Use dependency injection for app manager
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
index b6290719e7d..09f9ea4dbfa 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php
@@ -28,6 +28,7 @@ namespace OCA\DAV\Tests\unit\Connector\Sabre;
use OCA\DAV\Connector\Sabre\Directory;
use OCA\DAV\Connector\Sabre\FilesReportPlugin as FilesReportPluginImplementation;
+use OCP\App\IAppManager;
use OCP\Files\File;
use OCP\IConfig;
use OCP\IPreview;
@@ -81,6 +82,9 @@ class FilesReportPluginTest extends \Test\TestCase {
/** @var IPreview|\PHPUnit_Framework_MockObject_MockObject * */
private $previewManager;
+ /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject * */
+ private $appManager;
+
public function setUp() {
parent::setUp();
$this->tree = $this->getMockBuilder(Tree::class)
@@ -112,6 +116,10 @@ class FilesReportPluginTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
+ $this->appManager = $this->getMockBuilder(IAppManager::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
$this->tagManager = $this->createMock(ISystemTagManager::class);
$this->tagMapper = $this->createMock(ISystemTagObjectMapper::class);
$this->userSession = $this->createMock(IUserSession::class);
@@ -140,7 +148,8 @@ class FilesReportPluginTest extends \Test\TestCase {
$privateTagManager,
$this->userSession,
$this->groupManager,
- $this->userFolder
+ $this->userFolder,
+ $this->appManager
);
}