function testGetThemePathShouldReturnNullIfNoUserTheme() { unset($GLOBALS['sys_user_theme']); $GLOBALS['sys_pluginspath'] = '/plugins'; $GLOBALS['sys_custompluginspath'] = '/customplugins'; $GLOBALS['sys_pluginsroot'] = dirname(__FILE__) . '/test/plugins/'; $GLOBALS['sys_custompluginsroot'] = dirname(__FILE__) . '/test/custom/'; $shortname = 'shortname'; $pm = new MockPluginManager($this); $pm->setReturnValue('getNameForPlugin', $shortname); $p = new PluginTestVersion($this); $p->setReturnReference('_getPluginManager', $pm); $p->Plugin(); $this->assertEqual($p->getThemePath(), ''); }