Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-04-19 15:06:34 +0300
committerJoas Schilling <coding@schilljs.com>2021-04-27 15:34:32 +0300
commitdf47445c014b83d8400bada6dad53d26d24fd803 (patch)
treec1b46093f33a84209a7b037647888703b31b2e82 /tests/lib/Avatar
parent56ae87c281d2f54b23f98acf0e138d8e72196a06 (diff)
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Avatar')
-rw-r--r--tests/lib/Avatar/AvatarManagerTest.php8
-rw-r--r--tests/lib/Avatar/GuestAvatarTest.php6
-rw-r--r--tests/lib/Avatar/UserAvatarTest.php4
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/lib/Avatar/AvatarManagerTest.php b/tests/lib/Avatar/AvatarManagerTest.php
index d3bc60efb59..ce6981a2a21 100644
--- a/tests/lib/Avatar/AvatarManagerTest.php
+++ b/tests/lib/Avatar/AvatarManagerTest.php
@@ -36,9 +36,9 @@ use OCP\Files\IAppData;
use OCP\Files\SimpleFS\ISimpleFolder;
use OCP\IConfig;
use OCP\IL10N;
-use OCP\ILogger;
use OCP\IUser;
use OCP\IUserSession;
+use Psr\Log\LoggerInterface;
/**
* Class AvatarManagerTest
@@ -52,7 +52,7 @@ class AvatarManagerTest extends \Test\TestCase {
private $appData;
/** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
private $l10n;
- /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
/** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
private $config;
@@ -70,7 +70,7 @@ class AvatarManagerTest extends \Test\TestCase {
$this->userManager = $this->createMock(Manager::class);
$this->appData = $this->createMock(IAppData::class);
$this->l10n = $this->createMock(IL10N::class);
- $this->logger = $this->createMock(ILogger::class);
+ $this->logger = $this->createMock(LoggerInterface::class);
$this->config = $this->createMock(IConfig::class);
$this->accountManager = $this->createMock(IAccountManager::class);
$this->knownUserService = $this->createMock(KnownUserService::class);
@@ -247,7 +247,7 @@ class AvatarManagerTest extends \Test\TestCase {
}
if ($expectedPlaceholder) {
- $expected = new PlaceholderAvatar($folder, $user, $this->createMock(ILogger::class));
+ $expected = new PlaceholderAvatar($folder, $user, $this->createMock(LoggerInterface::class));
} else {
$expected = new UserAvatar($folder, $this->l10n, $user, $this->logger, $this->config);
}
diff --git a/tests/lib/Avatar/GuestAvatarTest.php b/tests/lib/Avatar/GuestAvatarTest.php
index 1c424234f10..b8e6d8ae2e8 100644
--- a/tests/lib/Avatar/GuestAvatarTest.php
+++ b/tests/lib/Avatar/GuestAvatarTest.php
@@ -26,8 +26,8 @@ namespace Test\Avatar;
use OC\Avatar\GuestAvatar;
use OCP\Files\SimpleFS\InMemoryFile;
-use OCP\ILogger;
use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
use Test\TestCase;
/**
@@ -48,8 +48,8 @@ class GuestAvatarTest extends TestCase {
* @return void
*/
public function setupGuestAvatar() {
- /* @var MockObject|ILogger $logger */
- $logger = $this->getMockBuilder(ILogger::class)->getMock();
+ /* @var MockObject|LoggerInterface $logger */
+ $logger = $this->getMockBuilder(LoggerInterface::class)->getMock();
$this->guestAvatar = new GuestAvatar('einstein', $logger);
}
diff --git a/tests/lib/Avatar/UserAvatarTest.php b/tests/lib/Avatar/UserAvatarTest.php
index 31f2a6ebf5b..3570f2017d5 100644
--- a/tests/lib/Avatar/UserAvatarTest.php
+++ b/tests/lib/Avatar/UserAvatarTest.php
@@ -16,7 +16,7 @@ use OCP\Files\NotFoundException;
use OCP\Files\SimpleFS\ISimpleFile;
use OCP\IConfig;
use OCP\IL10N;
-use OCP\ILogger;
+use Psr\Log\LoggerInterface;
class UserAvatarTest extends \Test\TestCase {
/** @var Folder | \PHPUnit\Framework\MockObject\MockObject */
@@ -309,7 +309,7 @@ class UserAvatarTest extends \Test\TestCase {
$this->folder,
$l,
$user,
- $this->createMock(ILogger::class),
+ $this->createMock(LoggerInterface::class),
$this->config
);
}