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


PHP Tracker_FormElementFactory::setInstance方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->user_manager = mock('UserManager');
     UserManager::setInstance($this->user_manager);
     $this->formelement_factory = mock('Tracker_FormElementFactory');
     Tracker_FormElementFactory::setInstance($this->formelement_factory);
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:8,代码来源:XMLExportTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->user = mock('User');
     $this->field = TestHelper::getPartialMock('Tracker_FormElement_Field_Computed', array('getProperty'));
     stub($this->field)->getProperty()->returns('effort');
     $this->formelement_factory = mock('Tracker_FormElementFactory');
     Tracker_FormElementFactory::setInstance($this->formelement_factory);
 }
开发者ID:nterray,项目名称:tuleap,代码行数:9,代码来源:Tracker_FormElement_Field_ComputedTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->current_user = aUser()->build();
     $this->form_element_factory = mock('Tracker_FormElementFactory');
     Tracker_FormElementFactory::setInstance($this->form_element_factory);
     $this->dao = mock('Tracker_Chart_Burndown_Data_LinkedArtifactsDao');
     stub($this->dao)->searchRemainingEffort()->returns(array());
     $this->burndown_data = TestHelper::getPartialMock('Tracker_Chart_Burndown_Data_LinkedArtifacts', array('getBurndownDao'));
     stub($this->burndown_data)->getBurndownDao()->returns($this->dao);
 }
开发者ID:nterray,项目名称:tuleap,代码行数:11,代码来源:LinkedArtifactsTest.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $this->field = stub('Tracker_FormElement_Field_String')->getId()->returns($this->field_id);
     $element_factory = mock('Tracker_FormElementFactory');
     stub($element_factory)->getFormElementById($this->field_id)->returns($this->field);
     Tracker_FormElementFactory::setInstance($element_factory);
     $this->dao = mock('Workflow_Transition_Condition_FieldNotEmpty_Dao');
     $this->factory = new Workflow_Transition_Condition_FieldNotEmpty_Factory($this->dao, $element_factory);
     $this->transition = stub('Transition')->getId()->returns(42);
     $this->field_string = stub('Tracker_FormElement_Field_String')->getId()->returns(0);
     $this->xml_mapping = array('F14' => $this->field_string);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:FactoryTest.php

示例5: 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

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $factory = mock('Tracker_FormElementFactory');
     $this->field = mock('Tracker_FormElement_Field_Selectbox');
     stub($this->field)->getId()->returns(123);
     stub($this->field)->isEmpty($this->not_empty_data, '*')->returns(false);
     stub($this->field)->isEmpty($this->empty_data, '*')->returns(true);
     stub($this->field)->isEmpty(null, '*')->returns(true);
     stub($factory)->getUsedFormElementById(123)->returns($this->field);
     Tracker_FormElementFactory::setInstance($factory);
     $this->dao = mock('Workflow_Transition_Condition_FieldNotEmpty_Dao');
     $this->transition = stub('Transition')->getId()->returns(42);
     $this->condition = new Workflow_Transition_Condition_FieldNotEmpty($this->transition, $this->dao);
     $this->artifact = mock('Tracker_Artifact');
     $this->changeset = mock('Tracker_Artifact_Changeset');
     stub($this->artifact)->getLastChangeset()->returns($this->changeset);
     $this->previous_value = mock('Tracker_Artifact_ChangesetValue');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:19,代码来源:FieldNotEmptyTest.php

示例7: GivenFormElementFactoryHasOnlyStartDateField

 private function GivenFormElementFactoryHasOnlyStartDateField()
 {
     Tracker_FormElementFactory::clearInstance();
     $form_element_factory = mock('Tracker_FormElementFactory');
     stub($form_element_factory)->getUsedFieldByNameForUser($this->sprint_tracker_id, 'start_date', $this->current_user)->returns($this->start_date_field);
     Tracker_FormElementFactory::setInstance($form_element_factory);
 }
开发者ID:nterray,项目名称:tuleap,代码行数:7,代码来源:Tracker_FormElement_Field_BurndownTest.php


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