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


PHP ProjectManager::setInstance方法代码示例

本文整理汇总了PHP中ProjectManager::setInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP ProjectManager::setInstance方法的具体用法?PHP ProjectManager::setInstance怎么用?PHP ProjectManager::setInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ProjectManager的用法示例。


在下文中一共展示了ProjectManager::setInstance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     EventManager::setInstance(mock('EventManager'));
     ProjectManager::setInstance(mock('ProjectManager'));
     $this->user_manager = mock('UserManager');
     UserManager::setInstance($this->user_manager);
     $this->rm = partial_mock('ReferenceManager', array('_getReferenceDao', '_getCrossReferenceDao', 'loadReservedKeywords', 'getGroupIdFromArtifactIdForCallbackFunction', 'getGroupIdFromArtifactId'));
     $this->rm->__construct();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:ReferenceManagerTest.php

示例2: setUp

 public function setUp()
 {
     $GLOBALS['Language'] = new ProjectCreatorTest_BaseLanguage();
     $this->event_manager = new MockSystemEventManager();
     $this->event_manager->setReturnValue('isUserNameAvailable', true);
     $this->event_manager->setReturnValue('isProjectNameAvailable', true);
     SystemEventManager::setInstance($this->event_manager);
     $this->project_manager = new MockProjectManager();
     $this->project_manager->setReturnValue('getProjectByUnixName', null);
     ProjectManager::setInstance($this->project_manager);
     $this->user_manager = new MockUserManager();
     $this->user_manager->setReturnValue('getUserByUserName', null);
     UserManager::setInstance($this->user_manager);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:14,代码来源:ProjectCreatorTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->literalizer = new UGroupLiteralizer();
     $this->docman_item = new Docman_Item();
     $this->docman_item->setId($this->item_id);
     $this->permissions_manager = mock('PermissionsManager');
     $this->project_manager = mock('ProjectManager');
     $this->project = mock('Project');
     $this->docman_permissions = new Docman_PermissionsItemManager();
     stub($this->project_manager)->getProject()->returns($this->project);
     stub($this->project)->getUnixName()->returns('gpig');
     stub($this->project)->getID()->returns($this->uniqId());
     PermissionsManager::setInstance($this->permissions_manager);
     ProjectManager::setInstance($this->project_manager);
     Docman_ItemFactory::setInstance($this->project->getID(), mock('Docman_ItemFactory'));
 }
开发者ID:nterray,项目名称:tuleap,代码行数:17,代码来源:PermissionsItemManagerTest.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $GLOBALS['ftp_frs_dir_prefix'] = 'whatever';
     $GLOBALS['ftp_anon_dir_prefix'] = 'whatever';
     $GLOBALS['svn_prefix'] = 'whatever';
     $GLOBALS['cvs_prefix'] = 'whatever';
     $GLOBALS['grpdir_prefix'] = 'whatever';
     $template = stub('Project')->isTemplate()->returns(true);
     $user_manager = mock('UserManager');
     UserManager::setInstance($user_manager);
     $project_manager = mock('ProjectManager');
     ProjectManager::setInstance($project_manager);
     stub($project_manager)->getProject($this->template_id)->returns($template);
     $system_event_manager = mock('SystemEventManager');
     SystemEventManager::setInstance($system_event_manager);
     stub($system_event_manager)->isUserNameAvailable()->returns(true);
     stub($system_event_manager)->isProjectNameAvailable()->returns(true);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:19,代码来源:OneStepProjectCreationValidatorTest.php


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