aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Avatar/GuestAvatarTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Avatar/GuestAvatarTest.php')
-rw-r--r--tests/lib/Avatar/GuestAvatarTest.php28
1 files changed, 7 insertions, 21 deletions
diff --git a/tests/lib/Avatar/GuestAvatarTest.php b/tests/lib/Avatar/GuestAvatarTest.php
index 6cb70b82902..b49fcea6ed2 100644
--- a/tests/lib/Avatar/GuestAvatarTest.php
+++ b/tests/lib/Avatar/GuestAvatarTest.php
@@ -3,23 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018, Michael Weimann <mail@michael-weimann.eu>
- *
- * @author Michael Weimann <mail@michael-weimann.eu>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
namespace Test\Avatar;
@@ -49,8 +34,9 @@ class GuestAvatarTest extends TestCase {
*/
public function setupGuestAvatar() {
/* @var MockObject|LoggerInterface $logger */
- $logger = $this->getMockBuilder(LoggerInterface::class)->getMock();
- $this->guestAvatar = new GuestAvatar('einstein', $logger);
+ $logger = $this->createMock(LoggerInterface::class);
+ $config = $this->createMock(\OCP\IConfig::class);
+ $this->guestAvatar = new GuestAvatar('einstein', $config, $logger);
}
/**
@@ -59,7 +45,7 @@ class GuestAvatarTest extends TestCase {
* For the test a static name "einstein" is used and
* the generated image is compared with an expected one.
*/
- public function testGet() {
+ public function testGet(): void {
$this->markTestSkipped('TODO: Disable because fails on drone');
$avatar = $this->guestAvatar->getFile(32);
self::assertInstanceOf(InMemoryFile::class, $avatar);
@@ -74,7 +60,7 @@ class GuestAvatarTest extends TestCase {
*
* @return void
*/
- public function testIsCustomAvatar() {
+ public function testIsCustomAvatar(): void {
self::assertFalse($this->guestAvatar->isCustomAvatar());
}
}