本文整理汇总了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();
}
示例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);
}
示例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'));
}
示例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);
}