public static function setUpBeforeClass() { global $mod_strings, $app_strings, $theme; $theme = SugarTestThemeUtilities::createAnonymousTheme(); $mod_strings = return_module_language($GLOBALS['current_language'], 'Connectors'); $app_strings = return_application_language($GLOBALS['current_language']); }
public function setup() { $this->_themeName = SugarTestThemeUtilities::createAnonymousTheme(); if (isset($GLOBALS['sugar_config']['default_theme'])) { $this->_oldDefaultTheme = $GLOBALS['sugar_config']['default_theme']; } $GLOBALS['sugar_config']['default_theme'] = $this->_themeName; SugarThemeRegistry::buildRegistry(); }
public function testCanTearDownAllCreatedAnonymousThemes() { $themesCreated = array(); for ($i = 0; $i < 5; $i++) { $themesCreated[] = SugarTestThemeUtilities::createAnonymousTheme(); } SugarTestThemeUtilities::removeAllCreatedAnonymousThemes(); foreach ($themesCreated as $themename) { $this->assertFalse(is_dir("themes/{$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; }
public function testGetBreadCrumbSymbolForLTRTheme() { $theme = SugarTestThemeUtilities::createAnonymousTheme(); SugarThemeRegistry::set($theme); $this->assertEquals("<span class='pointer'>»</span>", $this->_view->getBreadCrumbSymbol()); }