Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-12-16 16:58:56 +0300
committerJulius Härtl <jus@bitgrid.net>2019-12-16 19:22:53 +0300
commitde5384466c4236181d21810142e3f2773bdeefe7 (patch)
treeb3517808930b23fe43869830663201c5bf3267b1 /tests/lib/DirectEditing
parent29f6f15cf3c63df07b81d7c97fe547f27a3906b3 (diff)
Return empty template for default creators
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests/lib/DirectEditing')
-rw-r--r--tests/lib/DirectEditing/ManagerTest.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/lib/DirectEditing/ManagerTest.php b/tests/lib/DirectEditing/ManagerTest.php
index 52a18584d6e..a97c02f19d2 100644
--- a/tests/lib/DirectEditing/ManagerTest.php
+++ b/tests/lib/DirectEditing/ManagerTest.php
@@ -13,7 +13,9 @@ use OCP\DirectEditing\IToken;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\IDBConnection;
+use OCP\IL10N;
use OCP\IUserSession;
+use OCP\L10N\IFactory;
use OCP\Security\ISecureRandom;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
@@ -116,6 +118,12 @@ class ManagerTest extends TestCase {
$this->userSession = $this->createMock(IUserSession::class);
$this->rootFolder = $this->createMock(IRootFolder::class);
$this->userFolder = $this->createMock(Folder::class);
+ $this->l10n = $this->createMock(IL10N::class);
+
+ $l10nFactory = $this->createMock(IFactory::class);
+ $l10nFactory->expects($this->once())
+ ->method('get')
+ ->willReturn($this->l10n);
$this->rootFolder->expects($this->any())
@@ -123,7 +131,7 @@ class ManagerTest extends TestCase {
->willReturn($this->userFolder);
$this->manager = new Manager(
- $this->random, $this->connection, $this->userSession, $this->rootFolder
+ $this->random, $this->connection, $this->userSession, $this->rootFolder, $l10nFactory
);
$this->manager->registerDirectEditor($this->editor);