public function test_listTemplate() { $list = USVN_Template::listTemplate(); $this->assertTrue(in_array('default', $list)); $this->assertFalse(in_array('.', $list)); $this->assertFalse(in_array('..', $list)); $this->assertFalse(in_array('.svn', $list)); $this->assertFalse(in_array('.htaccess', $list)); }
/** * Change style of USVN * * @param string template name * @throw USVN_Exception */ public static function setTemplate($template) { if (in_array($template, USVN_Template::listTemplate())) { $config = new USVN_Config_Ini(USVN_CONFIG_FILE, USVN_CONFIG_SECTION); $config->template->name = $template; $config->save(); } else { throw new USVN_Exception(T_("Invalid template")); } }