summaryrefslogtreecommitdiffstats
path: root/tests/lib/AvatarManagerTest.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-10-04 13:11:33 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-10-05 11:00:17 +0200
commit7512683ea92127b06cd3a77e7f53d213d9e2fdb6 (patch)
treeef4aadbd8baadcb6aff9a7c977b41f58826855c3 /tests/lib/AvatarManagerTest.php
parenta7be37d73539bac8fd634279e225051b7ab9a8dd (diff)
downloadnextcloud-server-7512683ea92127b06cd3a77e7f53d213d9e2fdb6.tar.gz
nextcloud-server-7512683ea92127b06cd3a77e7f53d213d9e2fdb6.zip
Fix avatar tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/AvatarManagerTest.php')
-rw-r--r--tests/lib/AvatarManagerTest.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/lib/AvatarManagerTest.php b/tests/lib/AvatarManagerTest.php
index 0ad998af6d5..8ccc51d12e0 100644
--- a/tests/lib/AvatarManagerTest.php
+++ b/tests/lib/AvatarManagerTest.php
@@ -26,8 +26,8 @@ namespace Test;
use OC\Avatar;
use OC\AvatarManager;
-use OCP\Files\Folder;
-use OCP\Files\IRootFolder;
+use OCP\Files\IAppData;
+use OCP\Files\SimpleFS\ISimpleFolder;
use OCP\IConfig;
use OCP\IL10N;
use OCP\ILogger;
@@ -40,8 +40,8 @@ use OCP\IUserManager;
class AvatarManagerTest extends \Test\TestCase {
/** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
private $userManager;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
- private $rootFolder;
+ /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */
+ private $appData;
/** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
private $l10n;
/** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
@@ -55,14 +55,14 @@ class AvatarManagerTest extends \Test\TestCase {
parent::setUp();
$this->userManager = $this->createMock(IUserManager::class);
- $this->rootFolder = $this->createMock(IRootFolder::class);
+ $this->appData = $this->createMock(IAppData::class);
$this->l10n = $this->createMock(IL10N::class);
$this->logger = $this->createMock(ILogger::class);
$this->config = $this->createMock(IConfig::class);
$this->avatarManager = new AvatarManager(
$this->userManager,
- $this->rootFolder,
+ $this->appData,
$this->l10n,
$this->logger,
$this->config
@@ -94,11 +94,11 @@ class AvatarManagerTest extends \Test\TestCase {
->method('get')
->with('valid-user')
->willReturn($user);
- $folder = $this->createMock(Folder::class);
- $this->rootFolder
+ $folder = $this->createMock(ISimpleFolder::class);
+ $this->appData
->expects($this->once())
- ->method('get')
- ->with('/valid-user')
+ ->method('getFolder')
+ ->with('valid-user')
->willReturn($folder);
$expected = new Avatar($folder, $this->l10n, $user, $this->logger, $this->config);;