aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Avatar/UserAvatarTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Avatar/UserAvatarTest.php')
-rw-r--r--tests/lib/Avatar/UserAvatarTest.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/lib/Avatar/UserAvatarTest.php b/tests/lib/Avatar/UserAvatarTest.php
index fde2ccef5c3..0e2bfe6872f 100644
--- a/tests/lib/Avatar/UserAvatarTest.php
+++ b/tests/lib/Avatar/UserAvatarTest.php
@@ -50,7 +50,7 @@ class UserAvatarTest extends \Test\TestCase {
];
}
- public function testGetNoAvatar() {
+ public function testGetNoAvatar(): void {
$file = $this->createMock(ISimpleFile::class);
$this->folder->method('newFile')
->willReturn($file);
@@ -85,7 +85,7 @@ class UserAvatarTest extends \Test\TestCase {
$this->assertTrue($result->valid());
}
- public function testGetAvatarSizeMatch() {
+ public function testGetAvatarSizeMatch(): void {
$this->folder->method('fileExists')
->willReturnMap([
['avatar.jpg', true],
@@ -103,7 +103,7 @@ class UserAvatarTest extends \Test\TestCase {
$this->assertEquals($expected->data(), $this->avatar->get(128)->data());
}
- public function testGetAvatarSizeMinusOne() {
+ public function testGetAvatarSizeMinusOne(): void {
$this->folder->method('fileExists')
->willReturnMap([
['avatar.jpg', true],
@@ -120,7 +120,7 @@ class UserAvatarTest extends \Test\TestCase {
$this->assertEquals($expected->data(), $this->avatar->get(-1)->data());
}
- public function testGetAvatarNoSizeMatch() {
+ public function testGetAvatarNoSizeMatch(): void {
$this->folder->method('fileExists')
->willReturnMap([
['avatar.jpg', false],
@@ -164,11 +164,11 @@ class UserAvatarTest extends \Test\TestCase {
$this->assertEquals($expected2->data(), $this->avatar->get(32)->data());
}
- public function testExistsNo() {
+ public function testExistsNo(): void {
$this->assertFalse($this->avatar->exists());
}
- public function testExiststJPG() {
+ public function testExiststJPG(): void {
$this->folder->method('fileExists')
->willReturnMap([
['avatar.jpg', true],
@@ -177,7 +177,7 @@ class UserAvatarTest extends \Test\TestCase {
$this->assertTrue($this->avatar->exists());
}
- public function testExistsPNG() {
+ public function testExistsPNG(): void {
$this->folder->method('fileExists')
->willReturnMap([
['avatar.jpg', false],
@@ -186,7 +186,7 @@ class UserAvatarTest extends \Test\TestCase {
$this->assertTrue($this->avatar->exists());
}
- public function testSetAvatar() {
+ public function testSetAvatar(): void {
$avatarFileJPG = $this->createMock(File::class);
$avatarFileJPG->method('getName')
->willReturn('avatar.jpg');
@@ -232,7 +232,7 @@ class UserAvatarTest extends \Test\TestCase {
$this->avatar->set($image->data());
}
- public function testGenerateSvgAvatar() {
+ public function testGenerateSvgAvatar(): void {
$avatar = $this->invokePrivate($this->avatar, 'getAvatarVector', [64, false]);
$svg = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
@@ -247,7 +247,7 @@ class UserAvatarTest extends \Test\TestCase {
/**
* @dataProvider avatarTextData
*/
- public function testGetAvatarText($displayName, $expectedAvatarText) {
+ public function testGetAvatarText($displayName, $expectedAvatarText): void {
$user = $this->getUserWithDisplayName($displayName);
$avatar = $this->getUserAvatar($user);
@@ -255,12 +255,12 @@ class UserAvatarTest extends \Test\TestCase {
$this->assertEquals($expectedAvatarText, $avatarText);
}
- public function testHashToInt() {
+ public function testHashToInt(): void {
$hashToInt = $this->invokePrivate($this->avatar, 'hashToInt', ['abcdef', 18]);
$this->assertTrue(gettype($hashToInt) === 'integer');
}
- public function testMixPalette() {
+ public function testMixPalette(): void {
$colorFrom = new \OCP\Color(0, 0, 0);
$colorTo = new \OCP\Color(6, 12, 18);
$steps = 6;