aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-08-30 19:21:32 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-09-26 11:55:42 +0200
commit4659e3ab599f18069765cb2414a8ace8bdf30ca8 (patch)
tree03804075e3fdf644d8d488240d7f9db557fb2ba1 /apps
parent2fff203c598e8f71ee0aea4265efe7f952864d06 (diff)
downloadnextcloud-server-4659e3ab599f18069765cb2414a8ace8bdf30ca8.tar.gz
nextcloud-server-4659e3ab599f18069765cb2414a8ace8bdf30ca8.zip
Add new constructor args
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php7
-rw-r--r--apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php18
2 files changed, 18 insertions, 7 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index 5f903406168..0cdfcd69571 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -130,9 +130,12 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param IDBConnection $db
* @param Principal $principalBackend
* @param IUserManager $userManager
- * @param IConfig $config
+ * @param IConfig $config
*/
- public function __construct(IDBConnection $db, Principal $principalBackend, IUserManager $userManager, IConfig $config) {
+ public function __construct(IDBConnection $db,
+ Principal $principalBackend,
+ IUserManager $userManager,
+ IConfig $config) {
$this->db = $db;
$this->principalBackend = $principalBackend;
$this->userManager = $userManager;
diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
index 9ce558ad34b..85aad24d368 100644
--- a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
+++ b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php
@@ -3,10 +3,12 @@
namespace OCA\DAV\Tests\unit\CalDAV;
use OCA\DAV\CalDAV\Calendar;
+use OCA\DAV\Connector\Sabre\Principal;
use OCP\IL10N;
use OCP\IConfig;
use OCA\DAV\CalDAV\CalDavBackend;
use OCA\DAV\CalDAV\PublicCalendarRoot;
+use OCP\IUserManager;
use Test\TestCase;
use Sabre\Uri;
@@ -29,12 +31,13 @@ class PublicCalendarRootTest extends TestCase {
/** @var IL10N */
private $l10n;
-
+ /** @var IUserManager */
+ private $userManager;
+ /** @var Principal */
+ private $principal;
/** var IConfig */
protected $config;
- private $principal;
-
public function setUp() {
parent::setUp();
@@ -43,8 +46,14 @@ class PublicCalendarRootTest extends TestCase {
->disableOriginalConstructor()
->getMock();
$this->config = \OC::$server->getConfig();
+ $this->userManager = $this->getMockBuilder('\OCP\IUserManager')->getMock();
- $this->backend = new CalDavBackend($db, $this->principal, $this->config);
+ $this->backend = new CalDavBackend(
+ $db,
+ $this->principal,
+ $this->userManager,
+ $this->config
+ );
$this->publicCalendarRoot = new PublicCalendarRoot($this->backend);
@@ -99,5 +108,4 @@ class PublicCalendarRootTest extends TestCase {
return $calendar;
}
-
}