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


PHP Tracker_FormElementFactory::setReturnValue方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->factory = mock('Tracker_FormElementFactory');
     $this->new_changeset_fields_validator = new Tracker_Artifact_Changeset_NewChangesetFieldsValidator($this->factory);
     $this->initial_changeset_fields_validator = new Tracker_Artifact_Changeset_InitialChangesetFieldsValidator($this->factory);
     $this->field1 = $this->getFieldWithId(101);
     $this->field2 = $this->getFieldWithId(102);
     $this->field3 = $this->getFieldWithId(103);
     $this->factory->setReturnValue('getAllFormElementsForTracker', array());
     $this->factory->setReturnValue('getUsedFields', array($this->field1, $this->field2, $this->field3));
     $this->workflow = mock('Workflow');
     $this->artifact = aMockArtifact()->withTracker(mock('Tracker'))->build();
     stub($this->artifact)->getWorkflow()->returns($this->workflow);
     $this->changeset = mock('Tracker_Artifact_Changeset');
     $this->changeset_value1 = mock('Tracker_Artifact_ChangesetValue');
     $this->changeset_value2 = mock('Tracker_Artifact_ChangesetValue');
     $this->changeset_value3 = mock('Tracker_Artifact_ChangesetValue');
     stub($this->changeset)->getValue($this->field1)->returns($this->changeset_value1);
     $this->artifact_update = aMockArtifact()->withTracker(mock('Tracker'))->withlastChangeset($this->changeset)->build();
     stub($this->artifact_update)->getWorkflow()->returns($this->workflow);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:22,代码来源:FieldsValidatorTest.php


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