summaryrefslogtreecommitdiffstats
path: root/apps/federation/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-25 11:39:57 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-25 11:39:57 +0100
commit2d7528bc64640240452711891ce0b339935797c0 (patch)
tree49a14f9d8cba52ab91ab4cbb6da08a2f0ae05c2c /apps/federation/lib
parent7909c47b7c595acf2cd9e6ed2da4906339541311 (diff)
downloadnextcloud-server-2d7528bc64640240452711891ce0b339935797c0.tar.gz
nextcloud-server-2d7528bc64640240452711891ce0b339935797c0.zip
Adding unit tests
Diffstat (limited to 'apps/federation/lib')
-rw-r--r--apps/federation/lib/syncfederationaddressbooks.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/federation/lib/syncfederationaddressbooks.php b/apps/federation/lib/syncfederationaddressbooks.php
index cff848bf135..f9f402ea031 100644
--- a/apps/federation/lib/syncfederationaddressbooks.php
+++ b/apps/federation/lib/syncfederationaddressbooks.php
@@ -19,9 +19,8 @@ class SyncFederationAddressBooks {
/**
* @param DbHandler $dbHandler
*/
- function __construct(DbHandler $dbHandler) {
-
- $this->syncService = \OC::$server->query('CardDAVSyncService');
+ function __construct(DbHandler $dbHandler, $syncService) {
+ $this->syncService = $syncService;
$this->dbHandler = $dbHandler;
}
@@ -30,7 +29,7 @@ class SyncFederationAddressBooks {
$trustedServers = $this->dbHandler->getAllServer();
foreach ($trustedServers as $trustedServer) {
$url = $trustedServer['url'];
- $callback($url);
+ $callback($url, null);
$sharedSecret = $trustedServer['shared_secret'];
$syncToken = $trustedServer['sync_token'];