本文整理汇总了PHP中ForgeConfig::set方法的典型用法代码示例。如果您正苦于以下问题:PHP ForgeConfig::set方法的具体用法?PHP ForgeConfig::set怎么用?PHP ForgeConfig::set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ForgeConfig
的用法示例。
在下文中一共展示了ForgeConfig::set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
PluginManager::instance()->invalidateCache();
PluginFactory::clearInstance();
$this->old_globals = $GLOBALS;
$GLOBALS['feedback'] = '';
$GLOBALS['svn_prefix'] = '/tmp';
$GLOBALS['cvs_prefix'] = '/tmp';
$GLOBALS['grpdir_prefix'] = '/tmp';
$GLOBALS['ftp_frs_dir_prefix'] = '/tmp';
$GLOBALS['ftp_anon_dir_prefix'] = '/tmp';
$GLOBALS['sys_default_domain'] = '';
$GLOBALS['sys_cookie_prefix'] = '';
$GLOBALS['sys_force_ssl'] = 0;
ForgeConfig::store();
$this->old_sys_pluginsroot = $GLOBALS['sys_pluginsroot'];
$this->old_sys_custompluginsroot = $GLOBALS['sys_custompluginsroot'];
$GLOBALS['sys_pluginsroot'] = dirname(__FILE__) . '/../../plugins/';
$GLOBALS['sys_custompluginsroot'] = "/tmp";
ForgeConfig::set('tuleap_dir', __DIR__ . '/../../');
ForgeConfig::set('codendi_log', "/tmp/");
/**
* HACK
*/
require_once dirname(__FILE__) . '/../../plugins/fusionforge_compat/include/fusionforge_compatPlugin.class.php';
$ff_plugin = new fusionforge_compatPlugin();
$ff_plugin->loaded();
PluginManager::instance()->installAndActivate('mediawiki');
$plugin = PluginManager::instance()->getPluginByName('mediawiki');
EventManager::instance()->addListener(Event::IMPORT_XML_PROJECT, $plugin, 'importXmlProject', false);
EventManager::instance()->addListener('register_project_creation', $plugin, 'register_project_creation', false);
EventManager::instance()->addListener(Event::SERVICES_ALLOWED_FOR_PROJECT, $plugin, 'services_allowed_for_project', false);
putenv('TULEAP_LOCAL_INC=' . dirname(__FILE__) . '/_fixtures/local.inc');
}
示例2: itCreatesUserWithPrefixSetFromConfig
public function itCreatesUserWithPrefixSetFromConfig()
{
$suffix = '-team';
ForgeConfig::set(GenericUserFactory::CONFIG_KEY_SUFFIX, $suffix);
$generic_user = $this->factory->create('120', 'my_password');
$this->assertEqual(substr($generic_user->getUnixName(), -strlen($suffix)), $suffix);
}
示例3: setUp
public function setUp()
{
parent::setUp();
ForgeConfig::set('codendi_log', '/tmp');
$this->log_file = tempnam(ForgeConfig::get('codendi_log'), 'codendi_syslog');
$this->logger = new BackendLogger($this->log_file);
}
示例4: testFactoryShouldReturnModStuffIfStuffAuthIsConfiguredForThisProjectAndDefaultConfigIsModPerl
function testFactoryShouldReturnModStuffIfStuffAuthIsConfiguredForThisProjectAndDefaultConfigIsModPerl()
{
$projectInfo = array();
ForgeConfig::set(SVN_Apache_SvnrootConf::CONFIG_SVN_AUTH_KEY, SVN_Apache_SvnrootConf::CONFIG_SVN_AUTH_PERL);
$factory = $this->GivenAAuthFactoryWithStuffPlugin();
$this->assertIsA($factory->get($projectInfo), 'SVN_Apache_ModStuff');
}
示例5: setUp
public function setUp()
{
parent::setUp();
ForgeConfig::store();
ForgeConfig::set('sys_logger_level', 'debug');
$this->ldap = partial_mock('LDAP', array('search'), array($this->ldap_params, mock('TruncateLevelLogger'), new LdapQueryEscaper()));
}
示例6: setUp
public function setUp()
{
ForgeConfig::store();
ForgeConfig::set('codendi_log', '/tmp/');
$this->user = stub('PFUser')->getLdapId()->returns('whatever');
$this->driver = mock('Git_Driver_Gerrit');
$this->driver_factory = stub('Git_Driver_Gerrit_GerritDriverFactory')->getDriver()->returns($this->driver);
$this->user_finder = mock('Git_Driver_Gerrit_UserFinder');
$this->remote_server_factory = mock('Git_RemoteServer_GerritServerFactory');
$this->remote_server = stub('Git_RemoteServer_GerritServer')->getId()->returns(25);
$this->gerrit_user = mock('Git_Driver_Gerrit_User');
$this->gerrit_user_manager = mock('Git_Driver_Gerrit_UserAccountManager');
$this->project = mock('Project');
$this->u_group = mock('ProjectUGroup');
$this->u_group2 = mock('ProjectUGroup');
$this->u_group3 = mock('ProjectUGroup');
$this->git_repository = mock('GitRepository');
$this->project_manager = mock('ProjectManager');
stub($this->u_group)->getProject()->returns($this->project);
stub($this->u_group2)->getProject()->returns($this->project);
stub($this->u_group3)->getProject()->returns($this->project);
stub($this->project_manager)->getChildProjects()->returns(array());
stub($this->remote_server_factory)->getServer()->returns($this->remote_server);
stub($this->project)->getUnixName()->returns($this->project_name);
stub($this->gerrit_user_manager)->getGerritUser($this->user)->returns($this->gerrit_user);
}
示例7: itSavesNothingIfThereAreNoProjectLanguageAndMoreThanOneSystemLanguage
public function itSavesNothingIfThereAreNoProjectLanguageAndMoreThanOneSystemLanguage()
{
ForgeConfig::set('sys_supported_languages', 'it_IT,ja_JP');
stub($this->dao)->getUsedLanguageForProject()->returns(false);
expect($this->dao)->updateLanguageOption()->never();
$this->language_manager->getUsedLanguageForProject($this->project);
}
示例8: setUp
public function setUp()
{
parent::setUp();
$this->fixtures_dir = dirname(__FILE__) . '/_fixtures';
$this->citation_stripper = new Tracker_Artifact_MailGateway_CitationStripper();
ForgeConfig::store();
ForgeConfig::set('sys_strip_outlook', 1);
}
示例9: itHasALogFileFromConfiguration
public function itHasALogFileFromConfiguration()
{
ForgeConfig::store();
ForgeConfig::set(SVN_Apache_SvnrootConf::CONFIG_SVN_LOG_PATH, '${APACHE_LOG_DIR}/tuleap_svn.log');
$conf = $this->GivenAFullApacheConfWithModPerl();
$this->assertPattern('%\\${APACHE_LOG_DIR}/tuleap_svn\\.log%', $conf);
ForgeConfig::restore();
}
示例10: setUp
public function setUp()
{
parent::setUp();
ForgeConfig::store();
ForgeConfig::set('tmp_dir', $this->getTempDir());
$this->creator = new Tracker_XML_Updater_TemporaryFileCreator();
$this->initial = dirname(__FILE__) . '/_fixtures/toto.txt';
}
示例11: setUp
public function setUp()
{
parent::setUp();
$this->fixtures_dir = dirname(__FILE__) . '/_fixtures';
$this->project_manager = mock('ProjectManager');
$this->factory = new Tuleap_TourFactory($this->project_manager, mock('Url'));
$this->user = mock('PFUser');
ForgeConfig::set('sys_custom_incdir', $this->fixtures_dir);
}
示例12: itDoesNotGetToursIfCustomTourFolderDoesntExist
public function itDoesNotGetToursIfCustomTourFolderDoesntExist()
{
$request_uri = '';
ForgeConfig::set('sys_custom_incdir', $this->fixtures_dir . '/somewhereElse');
$user = mock('PFUser');
stub($user)->getLocale()->returns('en_US');
$tours = $this->factory->getToursForPage($user, $request_uri);
$this->assertEqual(count($tours), 0);
}
示例13: setUp
public function setUp()
{
parent::setUp();
ForgeConfig::store();
ForgeConfig::set('sys_dbhost', 'db_server');
ForgeConfig::set('sys_dbname', 'db');
ForgeConfig::set('svn_prefix', '/svnroot');
ForgeConfig::set('sys_dbauth_user', 'dbauth_user');
ForgeConfig::set('sys_dbauth_passwd', 'dbauth_passwd');
}
示例14: setUp
public function setUp()
{
parent::setUp();
ForgeConfig::store();
ForgeConfig::set('tuleap_dir', __DIR__ . '/../../../../../');
$this->a_user = aUser()->withId(101)->withUserName('kshen')->withRealName('Kool Shen')->withEmail('kshen@hotmail.fr')->withLdapId('cb9867')->build();
$this->another_user = aUser()->withId(102)->withUserName('jstar')->withRealName('Joeystarr <script>')->withEmail('jstar@caramail.com')->build();
$this->none = aUser()->withId(100)->build();
$this->collection = new UserXMLExportedCollection(new XML_RNGValidator(), new XML_SimpleXMLCDATAFactory());
}
示例15: setUp
public function setUp()
{
parent::setUp();
ForgeConfig::set('DEBUG_MODE', true);
if (self::$db_initialized == false) {
self::$db_initialized = true;
$this->initDb();
}
$this->mysqli->select_db($GLOBALS['sys_dbname']);
db_connect();
}