diff options
Diffstat (limited to 'apps/dav/tests/unit/caldav/caldavbackendtest.php')
-rw-r--r-- | apps/dav/tests/unit/caldav/caldavbackendtest.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/dav/tests/unit/caldav/caldavbackendtest.php b/apps/dav/tests/unit/caldav/caldavbackendtest.php index 87a700a473d..a4a19f5bd3e 100644 --- a/apps/dav/tests/unit/caldav/caldavbackendtest.php +++ b/apps/dav/tests/unit/caldav/caldavbackendtest.php @@ -136,14 +136,23 @@ class CalDavBackendTest extends TestCase { */ public function testCalendarSharing($userCanRead, $userCanWrite, $groupCanRead, $groupCanWrite, $add) { + $l10n = $this->getMockBuilder('\OCP\IL10N') + ->disableOriginalConstructor()->getMock(); + $l10n + ->expects($this->any()) + ->method('t') + ->will($this->returnCallback(function ($text, $parameters = array()) { + return vsprintf($text, $parameters); + })); + $calendarId = $this->createTestCalendar(); $books = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER); $this->assertEquals(1, count($books)); - $calendar = new Calendar($this->backend, $books[0]); + $calendar = new Calendar($this->backend, $books[0], $l10n); $this->backend->updateShares($calendar, $add, []); $books = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER1); $this->assertEquals(1, count($books)); - $calendar = new Calendar($this->backend, $books[0]); + $calendar = new Calendar($this->backend, $books[0], $l10n); $acl = $calendar->getACL(); $this->assertAcl(self::UNIT_TEST_USER, '{DAV:}read', $acl); $this->assertAcl(self::UNIT_TEST_USER, '{DAV:}write', $acl); |