mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Revert "Fix unit tests for the theming app"
This reverts commit 13ca01ee12.
This commit is contained in:
parent
4c6be330ef
commit
0ea23cad0e
4 changed files with 3 additions and 25 deletions
|
|
@ -59,10 +59,4 @@
|
|||
--primary-invert-if-bright: no;
|
||||
--background-invert-if-dark: no;
|
||||
--background-invert-if-bright: invert(100%);
|
||||
--image-logo: url('/core/img/logo/logo.png?v=0');
|
||||
--image-logoheader: url('/core/img/logo/logo.png?v=0');
|
||||
--image-favicon: url('/core/img/logo/logo.png?v=0');
|
||||
--image-background-size: cover;
|
||||
--image-background: url('/core/img/background.png?v=0');
|
||||
--image-login-background: url('/core/img/background.png?v=0');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ class DefaultTheme implements ITheme {
|
|||
'--background-invert-if-bright' => 'invert(100%)',
|
||||
];
|
||||
|
||||
// Register image variables only if custom-defined
|
||||
$backgroundDeleted = $this->config->getAppValue('theming', 'backgroundMime', '') === 'backgroundColor';
|
||||
foreach(['logo', 'logoheader', 'favicon', 'background'] as $image) {
|
||||
if ($this->imageManager->hasImage($image)) {
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ class ImageManagerTest extends TestCase {
|
|||
foreach ($folders as $index => $folder) {
|
||||
$folder->expects($this->any())
|
||||
->method('getName')
|
||||
->willReturn((string)$index);
|
||||
->willReturn($index);
|
||||
}
|
||||
$folders[0]->expects($this->once())->method('delete');
|
||||
$folders[1]->expects($this->once())->method('delete');
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
namespace OCA\Theming\Tests;
|
||||
namespace OCA\Theming\Tests\Service;
|
||||
|
||||
use OC\App\AppManager;
|
||||
use OCA\Theming\ImageManager;
|
||||
|
|
@ -68,23 +68,6 @@ class DefaultThemeTest extends TestCase {
|
|||
->method('getColorPrimary')
|
||||
->willReturn('#0082c9');
|
||||
|
||||
$this->imageManager->expects($this->any())
|
||||
->method('getImageUrl')
|
||||
->willReturnCallback(function (string $name): string {
|
||||
switch ($name) {
|
||||
case 'logo':
|
||||
case 'logoheader':
|
||||
case 'favicon':
|
||||
return '/core/img/logo/logo.png?v=0';
|
||||
case 'background':
|
||||
case 'login-background':
|
||||
return '/core/img/background.png?v=0';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$this->l10n
|
||||
->expects($this->any())
|
||||
->method('t')
|
||||
|
|
|
|||
Loading…
Reference in a new issue