Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add IL10N to unit test
Signed-off-by: Lukas Reschke <[email protected]>
  • Loading branch information
LukasReschke committed Sep 27, 2016
commit 479c427f2a3328ccf34b5ef57598eb8fc305f995
15 changes: 15 additions & 0 deletions apps/dav/tests/unit/DAV/HookManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,26 @@
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()
Expand Down