Switch guest avatars to PNG

Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
This commit is contained in:
Michael Weimann 2019-01-29 19:52:19 +01:00 committed by Morris Jobke
parent bf1253cb49
commit 2a8118e459
No known key found for this signature in database
GPG key ID: FE03C3A163FEDE68
3 changed files with 3 additions and 3 deletions

View file

@ -90,8 +90,8 @@ class GuestAvatar extends Avatar {
* @return InMemoryFile
*/
public function getFile($size) {
$avatar = $this->getAvatarVector($size);
return new InMemoryFile('avatar.svg', $avatar);
$avatar = $this->generateAvatar($this->userDisplayName, $size);
return new InMemoryFile('avatar.png', $avatar);
}
/**

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

View file

@ -64,7 +64,7 @@ class GuestAvatarTest extends TestCase {
$avatar = $this->guestAvatar->getFile(32);
self::assertInstanceOf(InMemoryFile::class, $avatar);
$expectedFile = file_get_contents(
__DIR__ . '/../../data/guest_avatar_einstein_32.svg'
__DIR__ . '/../../data/guest_avatar_einstein_32.png'
);
self::assertEquals(trim($expectedFile), trim($avatar->getContent()));
}