summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-12-12 08:29:26 +0100
committerGitHub <noreply@github.com>2017-12-12 08:29:26 +0100
commitd98dea1eb139ae33dfce28f5c61b140518ef4d1d (patch)
tree6bd1527425761a5b9c6657874e573f9a4ae8a38d /apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
parente1740c92421d9f6e05210c1cd69811e429f88410 (diff)
parent2b51d84b98a5a44c2a42a8498164a35b6822e760 (diff)
downloadnextcloud-server-d98dea1eb139ae33dfce28f5c61b140518ef4d1d.tar.gz
nextcloud-server-d98dea1eb139ae33dfce28f5c61b140518ef4d1d.zip
Merge pull request #6884 from nextcloud/feature/3003/opt_out_of_birthday_calendar
Opt out of birthday calendar
Diffstat (limited to 'apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php')
-rw-r--r--apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
index 57707c6c0a4..c10b333e28d 100644
--- a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
+++ b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
@@ -30,6 +30,7 @@ namespace OCA\DAV\Tests\unit\CalDAV;
use OCA\DAV\CalDAV\Calendar;
use OCA\DAV\CalDAV\PublicCalendar;
use OCA\DAV\Connector\Sabre\Principal;
+use OCP\IConfig;
use OCP\IGroupManager;
use OCP\IL10N;
use OCA\DAV\CalDAV\CalDavBackend;
@@ -62,6 +63,8 @@ class PublicCalendarRootTest extends TestCase {
protected $userManager;
/** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
protected $groupManager;
+ /** @var IConfig */
+ protected $config;
/** @var ISecureRandom */
private $random;
@@ -92,11 +95,12 @@ class PublicCalendarRootTest extends TestCase {
$this->logger,
$dispatcher
);
-
- $this->publicCalendarRoot = new PublicCalendarRoot($this->backend);
-
$this->l10n = $this->getMockBuilder(IL10N::class)
->disableOriginalConstructor()->getMock();
+ $this->config = $this->createMock(IConfig::class);
+
+ $this->publicCalendarRoot = new PublicCalendarRoot($this->backend,
+ $this->l10n, $this->config);
}
public function tearDown() {
@@ -146,11 +150,11 @@ class PublicCalendarRootTest extends TestCase {
$this->backend->createCalendar(self::UNIT_TEST_USER, 'Example', []);
$calendarInfo = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER)[0];
- $calendar = new PublicCalendar($this->backend, $calendarInfo, $this->l10n);
+ $calendar = new PublicCalendar($this->backend, $calendarInfo, $this->l10n, $this->config);
$publicUri = $calendar->setPublishStatus(true);
$calendarInfo = $this->backend->getPublicCalendar($publicUri);
- $calendar = new PublicCalendar($this->backend, $calendarInfo, $this->l10n);
+ $calendar = new PublicCalendar($this->backend, $calendarInfo, $this->l10n, $this->config);
return $calendar;
}