public function tearDown() { SugarTestThemeUtilities::removeAllCreatedAnonymousThemes(); if (isset($this->_oldDefaultTheme)) { $GLOBALS['sugar_config']['default_theme'] = $this->_oldDefaultTheme; } }
public static function tearDownAfterClass() { global $mod_strings, $app_strings, $theme; SugarTestThemeUtilities::removeAllCreatedAnonymousThemes(); unset($theme); unset($mod_strings); unset($app_strings); }
public function tearDown() { $themesToRemove = array($this->_themeObject->__toString(), $this->_themeObjectChild->__toString()); SugarTestThemeUtilities::removeAllCreatedAnonymousThemes(); if ($this->_olddeveloperMode) { $GLOBALS['sugar_config']['developerMode'] = $this->_olddeveloperMode; } else { unset($GLOBALS['sugar_config']['developerMode']); } }
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}")); } }