當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Tracker_ArtifactFactory::setInstance方法代碼示例

本文整理匯總了PHP中Tracker_ArtifactFactory::setInstance方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tracker_ArtifactFactory::setInstance方法的具體用法?PHP Tracker_ArtifactFactory::setInstance怎麽用?PHP Tracker_ArtifactFactory::setInstance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Tracker_ArtifactFactory的用法示例。


在下文中一共展示了Tracker_ArtifactFactory::setInstance方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->user = mock('PFUser');
     $this->dao = mock('Tracker_FormElement_Field_ComputedDao');
     $this->field = TestHelper::getPartialMock('Tracker_FormElement_Field_Computed', array('getProperty', 'getDao'));
     stub($this->field)->getProperty('target_field_name')->returns('effort');
     stub($this->field)->getProperty('fast_compute')->returns(1);
     stub($this->field)->getDao()->returns($this->dao);
     $this->artifact_factory = mock('Tracker_ArtifactFactory');
     Tracker_ArtifactFactory::setInstance($this->artifact_factory);
     $this->formelement_factory = mock('Tracker_FormElementFactory');
     Tracker_FormElementFactory::setInstance($this->formelement_factory);
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:14,代碼來源:Tracker_FormElement_Field_ComputedTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->form_element_factory = new MockTracker_FormElementFactory();
     $this->semantic_factory = new MockTracker_CrossSearch_SemanticValueFactory();
     $this->planning_trackers = array();
     $this->artifact_factory = new MockTracker_ArtifactFactory();
     Tracker_ArtifactFactory::setInstance($this->artifact_factory);
     $this->project = new MockProject();
     $this->report = new MockTracker_Report();
     $this->user = mock('User');
     stub($this->semantic_factory)->allTitlesAreReadable($this->user, $this->project)->returns(true);
     stub($this->semantic_factory)->allStatusesAreReadable($this->user, $this->project)->returns(true);
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:14,代碼來源:CriteriaBuilderTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->user = mock('User');
     $this->planning_tracker_id = 191;
     $this->planning_tracker = mock('Tracker');
     $this->planning = mock('Planning');
     $this->content_view = mock('Tracker_CrossSearch_SearchContentView');
     $this->artifacts_to_select = array();
     $this->artifact = null;
     $factory = mock('Tracker_ArtifactFactory');
     Tracker_ArtifactFactory::setInstance($factory);
     $this->generateABunchOfArtifacts($factory);
     $hierarchy_factory = mock('Tracker_Hierarchy_HierarchicalTrackerFactory');
     Tracker_Hierarchy_HierarchicalTrackerFactory::setInstance($hierarchy_factory);
     stub($this->planning)->getPlanningTrackerId()->returns($this->planning_tracker_id);
     stub($this->planning)->getPlanningTracker()->returns($this->planning_tracker);
     stub($this->planning_tracker)->getId()->returns($this->planning_tracker_id);
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:19,代碼來源:MilestonePresenterTest.php

示例4: itMustNotBuildBurndownWhenArtifactDoesNotExist

 public function itMustNotBuildBurndownWhenArtifactDoesNotExist()
 {
     $request = new Codendi_Request(array('formElement' => 1234, 'func' => Tracker_FormElement_Field_Burndown::FUNC_SHOW_BURNDOWN, 'src_aid' => 999));
     $artifactFactory = stub('Tracker_ArtifactFactory')->getArtifactById()->returns(null);
     Tracker_ArtifactFactory::setInstance($artifactFactory);
     $this->field->expectNever('fetchBurndownImage');
     $this->field->process($this->tracker_manager, $request, $this->current_user);
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:8,代碼來源:Tracker_FormElement_Field_BurndownTest.php


注:本文中的Tracker_ArtifactFactory::setInstance方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。