summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/avatarmanagertest.php2
-rw-r--r--tests/lib/avatartest.php5
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/lib/avatarmanagertest.php b/tests/lib/avatarmanagertest.php
index 40d07bb49ae..cb9068c46a6 100644
--- a/tests/lib/avatarmanagertest.php
+++ b/tests/lib/avatarmanagertest.php
@@ -55,7 +55,7 @@ class AvatarManagerTest extends \Test\TestCase {
public function testGetAvatarValidUser() {
$this->userManager->expects($this->once())
- ->method('userExists')
+ ->method('get')
->with('validUser')
->willReturn(true);
diff --git a/tests/lib/avatartest.php b/tests/lib/avatartest.php
index fe6d3e2fa3f..2e7ec00428f 100644
--- a/tests/lib/avatartest.php
+++ b/tests/lib/avatartest.php
@@ -20,9 +20,12 @@ class AvatarTest extends \Test\TestCase {
parent::setUp();
$this->folder = $this->getMock('\OCP\Files\Folder');
+ /** @var \OCP\IL10N | PHPUnit_Framework_MockObject_MockObject $l */
$l = $this->getMock('\OCP\IL10N');
$l->method('t')->will($this->returnArgument(0));
- $this->avatar = new \OC\Avatar($this->folder, $l);
+ /** @var \OC\User\User | PHPUnit_Framework_MockObject_MockObject $user */
+ $user = $this->getMockBuilder('\OC\User\User')->disableOriginalConstructor()->getMock();
+ $this->avatar = new \OC\Avatar($this->folder, $l, $user);
}
public function testGetNoAvatar() {