当前位置: 首页>>代码示例>>PHP>>正文


PHP ForgeConfig::set方法代码示例

本文整理汇总了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');
 }
开发者ID:AdriandeCita,项目名称:tuleap,代码行数:35,代码来源:ProjectImportTest.php

示例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);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:GenericUserFactoryTest.php

示例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);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:BackendLoggerTest.php

示例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');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:SVN_Apache_Auth_FactoryTest.php

示例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()));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:LDAPTest.php

示例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);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:26,代码来源:MembershipManagerTest.php

示例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);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:MediawikiLanguageManagerTest.php

示例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);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:CitationStripperTest.php

示例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();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:SVN_Apache_SvnrootConfTest.php

示例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';
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:TemporaryFileCreatorTest.php

示例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);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:TourFactoryTest.php

示例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);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:CustomToursFactoryTest.php

示例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');
 }
开发者ID:ansarbek,项目名称:tuleap,代码行数:10,代码来源:SVN_Apache_ModMysqlTest.php

示例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());
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:UserXMLExportedCollectionTest.php

示例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();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:TuleapDbTestCase.class.php


注:本文中的ForgeConfig::set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。