summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-22 11:34:49 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-25 20:05:11 +0100
commitf165ad8864e5bdb213bdeb06d96b66612cee4fef (patch)
treea2ca41f40852b39fa16c79ca074cd6a1ac617712 /tests
parentfe08700b597b8c765716e92569d30524cfef9b84 (diff)
downloadnextcloud-server-f165ad8864e5bdb213bdeb06d96b66612cee4fef.tar.gz
nextcloud-server-f165ad8864e5bdb213bdeb06d96b66612cee4fef.zip
Changing the avatar of the user emits the changeUser event which triggers update of the system addressbook
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() {