Ensure theme cache is rest to the "test" theme for ImageResizer
This commit is contained in:
parent
aeae1bd0f5
commit
5b5a15b4c6
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
use Cms\Classes\Theme;
|
||||
use System\Classes\ImageResizer;
|
||||
use System\Classes\MediaLibrary;
|
||||
use System\Models\File as FileModel;
|
||||
|
|
@ -15,10 +16,9 @@ class ImageResizerTest extends PluginTestCase
|
|||
{
|
||||
parent::setUp();
|
||||
|
||||
Event::forget('cms.theme.getActiveTheme');
|
||||
Event::listen('cms.theme.getActiveTheme', function () {
|
||||
return 'test';
|
||||
});
|
||||
Config::set('cms.activeTheme', 'test');
|
||||
Event::flush('cms.theme.getActiveTheme');
|
||||
Theme::resetCache();
|
||||
}
|
||||
|
||||
public function tearDown(): void
|
||||
|
|
|
|||
Loading…
Reference in New Issue