summaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/RequestTest/UploadTest.php1
-rw-r--r--apps/dav/tests/unit/DAV/HookManagerTest.php9
2 files changed, 4 insertions, 6 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/UploadTest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/UploadTest.php
index f22da14a0d8..1db85b1bcaf 100644
--- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/UploadTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/UploadTest.php
@@ -88,6 +88,7 @@ class UploadTest extends RequestTest {
public function testUploadOverWriteWriteLocked() {
$user = $this->getUniqueID();
$view = $this->setupUser($user, 'pass');
+ $this->loginAsUser($user);
$view->file_put_contents('foo.txt', 'bar');
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() {