summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/DAV/HookManagerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests/unit/DAV/HookManagerTest.php')
-rw-r--r--apps/dav/tests/unit/DAV/HookManagerTest.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/dav/tests/unit/DAV/HookManagerTest.php b/apps/dav/tests/unit/DAV/HookManagerTest.php
index 5b7d4700a5f..f980e595bf9 100644
--- a/apps/dav/tests/unit/DAV/HookManagerTest.php
+++ b/apps/dav/tests/unit/DAV/HookManagerTest.php
@@ -58,7 +58,6 @@ class HookManagerTest extends TestCase {
$userManager = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()
->getMock();
- $userManager->expects($this->once())->method('get')->willReturn($user);
/** @var SyncService | \PHPUnit_Framework_MockObject_MockObject $syncService */
$syncService = $this->getMockBuilder(SyncService::class)
@@ -84,7 +83,7 @@ class HookManagerTest extends TestCase {
'contacts', ['{DAV:}displayname' => 'Contacts']);
$hm = new HookManager($userManager, $syncService, $cal, $card);
- $hm->postLogin(['uid' => 'newUser']);
+ $hm->firstLogin($user);
}
public function testWithExisting() {
@@ -97,7 +96,6 @@ class HookManagerTest extends TestCase {
$userManager = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()
->getMock();
- $userManager->expects($this->once())->method('get')->willReturn($user);
/** @var SyncService | \PHPUnit_Framework_MockObject_MockObject $syncService */
$syncService = $this->getMockBuilder(SyncService::class)
@@ -119,7 +117,7 @@ class HookManagerTest extends TestCase {
$card->expects($this->never())->method('createAddressBook');
$hm = new HookManager($userManager, $syncService, $cal, $card);
- $hm->postLogin(['uid' => 'newUser']);
+ $hm->firstLogin($user);
}
public function testWithBirthdayCalendar() {
@@ -132,7 +130,6 @@ class HookManagerTest extends TestCase {
$userManager = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()
->getMock();
- $userManager->expects($this->once())->method('get')->willReturn($user);
/** @var SyncService | \PHPUnit_Framework_MockObject_MockObject $syncService */
$syncService = $this->getMockBuilder(SyncService::class)
@@ -158,7 +155,7 @@ class HookManagerTest extends TestCase {
'contacts', ['{DAV:}displayname' => 'Contacts']);
$hm = new HookManager($userManager, $syncService, $cal, $card);
- $hm->postLogin(['uid' => 'newUser']);
+ $hm->firstLogin($user);
}
public function testDeleteCalendar() {