public function testCanCreateAnAnonymousChildTheme() { $themename = SugarTestThemeUtilities::createAnonymousTheme(); $childtheme = SugarTestThemeUtilities::createAnonymousChildTheme($themename); $this->assertTrue(is_dir("themes/{$childtheme}")); $this->assertTrue(is_file("themes/{$childtheme}/themedef.php")); $themedef = array(); include "themes/{$childtheme}/themedef.php"; $this->assertEquals($themedef['parentTheme'], $themename); }
public function setup() { $themedef = array(); include 'themes/' . SugarTestThemeUtilities::createAnonymousTheme() . '/themedef.php'; $this->_themeDef = $themedef; SugarThemeRegistry::add($this->_themeDef); $this->_themeObject = SugarThemeRegistry::get($this->_themeDef['dirName']); $themedef = array(); include 'themes/' . SugarTestThemeUtilities::createAnonymousChildTheme($this->_themeObject->__toString()) . '/themedef.php'; $this->_themeDefChild = $themedef; SugarThemeRegistry::add($this->_themeDefChild); $this->_themeObjectChild = SugarThemeRegistry::get($this->_themeDefChild['dirName']); // test assumes developerMode is off, so css minifying happens if (isset($GLOBALS['sugar_config']['developerMode'])) { $this->_olddeveloperMode = $GLOBALS['sugar_config']['developerMode']; } $GLOBALS['sugar_config']['developerMode'] = false; }