diff --git a/modules/system/tests/classes/AutoDatasourceTest.php b/modules/cms/tests/classes/AutoDatasourceTest.php similarity index 99% rename from modules/system/tests/classes/AutoDatasourceTest.php rename to modules/cms/tests/classes/AutoDatasourceTest.php index d3550ee691..b481c2afc9 100644 --- a/modules/system/tests/classes/AutoDatasourceTest.php +++ b/modules/cms/tests/classes/AutoDatasourceTest.php @@ -1,6 +1,6 @@ markTestSkipped('The CMS module is not active.'); + } + // Resize with default options $imageResizer = new ImageResizer( (new CmsController())->themeUrl('assets/images/winter.png'), @@ -178,6 +182,10 @@ public function testConfiguration() */ public function testURLSources() { + if (!in_array('Cms', Config::get('cms.loadModules', []))) { + $this->markTestSkipped('The CMS module is not active.'); + } + // Theme URL (absolute URL) $this->setUpStorage(); $this->copyMedia(); @@ -352,6 +360,10 @@ public function testSpaceInFilename() public function testGetResizedUrl() { + if (!in_array('Cms', Config::get('cms.loadModules', []))) { + $this->markTestSkipped('The CMS module is not active.'); + } + $imageResizer = new ImageResizer((new CmsController())->themeUrl('assets/images/winter.png')); Config::set('cms.linkPolicy', 'force'); @@ -365,6 +377,10 @@ public function testGetResizedUrl() public function testGetResizerUrl() { + if (!in_array('Cms', Config::get('cms.loadModules', []))) { + $this->markTestSkipped('The CMS module is not active.'); + } + $imageResizer = new ImageResizer((new CmsController())->themeUrl('assets/images/winter.png')); Config::set('cms.linkPolicy', 'force');