summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-09-27 21:12:24 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-09-27 21:12:37 +0200
commit479c427f2a3328ccf34b5ef57598eb8fc305f995 (patch)
tree431e95a2374ee173071a76e5c66f0f25a62f3793 /apps
parentda1543eef7d0e00a928b582858fc0f906c671b36 (diff)
downloadnextcloud-server-479c427f2a3328ccf34b5ef57598eb8fc305f995.tar.gz
nextcloud-server-479c427f2a3328ccf34b5ef57598eb8fc305f995.zip
Add IL10N to unit test
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/tests/unit/DAV/HookManagerTest.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/dav/tests/unit/DAV/HookManagerTest.php b/apps/dav/tests/unit/DAV/HookManagerTest.php
index 4a60542a01d..e9351ebc84a 100644
--- a/apps/dav/tests/unit/DAV/HookManagerTest.php
+++ b/apps/dav/tests/unit/DAV/HookManagerTest.php
@@ -28,11 +28,26 @@ use OCA\DAV\CalDAV\CalDavBackend;
use OCA\DAV\CardDAV\CardDavBackend;
use OCA\DAV\CardDAV\SyncService;
use OCA\DAV\HookManager;
+use OCP\IL10N;
use OCP\IUser;
use OCP\IUserManager;
use Test\TestCase;
class HookManagerTest extends TestCase {
+ /** @var IL10N */
+ private $l10n;
+
+ public function setUp() {
+ parent::setUp();
+ $this->l10n = $this->createMock(IL10N::class);
+ $this->l10n
+ ->expects($this->any())
+ ->method('t')
+ ->will($this->returnCallback(function ($text, $parameters = []) {
+ return vsprintf($text, $parameters);
+ }));
+ }
+
public function test() {
$user = $this->getMockBuilder(IUser::class)
->disableOriginalConstructor()