Merge pull request #38291 from nextcloud/fix-loading-themed-logo

fix loading custom logo image
pull/38308/head
Robin Appelman 2 years ago committed by GitHub
commit 5479eb3cc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/theming/lib/Util.php
  2. 6
      apps/theming/tests/IconBuilderTest.php
  3. 4
      apps/theming/tests/UtilTest.php

@ -190,7 +190,7 @@ class Util {
if ($this->config->getAppValue('theming', 'logoMime', '') !== '') {
$logoFile = null;
try {
$folder = $this->appData->getFolder('images');
$folder = $this->appData->getFolder('global/images');
return $folder->getFile('logo');
} catch (NotFoundException $e) {
}

@ -103,7 +103,7 @@ class IconBuilderTest extends TestCase {
->willReturn($color);
$this->appData->expects($this->once())
->method('getFolder')
->with('images')
->with('global/images')
->willThrowException(new NotFoundException());
$expectedIcon = new \Imagick(realpath(dirname(__FILE__)). "/data/" . $file);
@ -132,7 +132,7 @@ class IconBuilderTest extends TestCase {
->willReturn($color);
$this->appData->expects($this->once())
->method('getFolder')
->with('images')
->with('global/images')
->willThrowException(new NotFoundException());
$expectedIcon = new \Imagick(realpath(dirname(__FILE__)). "/data/" . $file);
@ -165,7 +165,7 @@ class IconBuilderTest extends TestCase {
->willReturn($color);
$this->appData->expects($this->once())
->method('getFolder')
->with('images')
->with('global/images')
->willThrowException(new NotFoundException());
$expectedIcon = new \Imagick(realpath(dirname(__FILE__)). "/data/" . $file);

@ -153,7 +153,7 @@ class UtilTest extends TestCase {
public function testGetAppIcon($app, $expected) {
$this->appData->expects($this->any())
->method('getFolder')
->with('images')
->with('global/images')
->willThrowException(new NotFoundException());
$this->appManager->expects($this->once())
->method('getAppPath')
@ -180,7 +180,7 @@ class UtilTest extends TestCase {
->willReturn($file);
$this->appData->expects($this->once())
->method('getFolder')
->with('images')
->with('global/images')
->willReturn($folder);
$icon = $this->util->getAppIcon('noapplikethis');
$this->assertEquals($file, $icon);

Loading…
Cancel
Save