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


PHP TuleapTestCase::setUp方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $this->artifact = anArtifact()->withId(9787)->build();
     $this->data = array('somekey' => 'somevalue');
     $this->node = new ArtifactNode($this->artifact, $this->data);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:NodeTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $this->response = mock('Git_GitoliteHousekeeping_GitoliteHousekeepingResponse');
     $this->backend_service = mock('BackendService');
     $this->command = new Git_GitoliteHousekeeping_ChainOfResponsibility_ServiceRestarter($this->response, $this->backend_service);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:ServiceRestarterTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->target_tracker = aTracker()->withId(12)->withChildren(array())->build();
     $this->formelement_factory = mock('Tracker_FormElementFactory');
     $this->factory = new Tracker_Workflow_Trigger_RulesBuilderFactory($this->formelement_factory);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:RulesBuilderFactoryTest.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     $this->dao = mock('Git_Driver_Gerrit_ProjectCreatorStatusDao');
     $this->repository = mock('GitRepository');
     $this->gerrit_status = new Git_Driver_Gerrit_ProjectCreatorStatus($this->dao);
 }
开发者ID:blestab,项目名称:tuleap,代码行数:7,代码来源:ProjectCreatorStatusTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $this->node_factory = mock('Cardwall_CardInCellPresenterNodeFactory');
     $this->artifact_factory = mock('Tracker_ArtifactFactory');
     $this->provider = new Cardwall_ArtifactNodeTreeProvider4Tests($this->node_factory, $this->artifact_factory);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:RendererBoardBuilder.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $this->wiki_page = mock('WikiPage');
     $this->group_id = 101;
     $this->actions = mock('FullTextSearchWikiActions');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:SystemEvent_FULLTEXTSEARCH_WIKITest.class.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     $this->dao = mock('Openid_Dao');
     $this->driver = mock('Openid_Driver_ConnexionDriver');
     $this->connexion_manager = new Openid_ConnexionManager($this->driver);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:ConnexionManagerTest.php

示例8: setUp

 public function setUp()
 {
     parent::setUp();
     $this->user = mock('PFUser');
     $this->user->setReturnValue('getId', 666);
     $this->artifact = new MockTracker_Artifact($this);
     $af = new MockTracker_ArtifactFactory($this);
     $af->setReturnReference('getArtifactById', $this->artifact, array('1'));
     $this->report = new MockTracker_Report($this);
     $rf = new MockTracker_ReportFactory($this);
     $rf->setReturnReference('getReportById', $this->report, array('2', $this->user->getId(), true));
     $this->tracker = new MockTracker($this);
     $this->tracker->setReturnValue('isActive', true);
     $this->tracker->setReturnValue('userCanView', true);
     $tf = new MockTrackerFactory($this);
     $tf->setReturnReference('getTrackerById', $this->tracker, array(3));
     $this->formElement = new MockTracker_FormElement_Interface($this);
     $ff = new MockTracker_FormElementFactory($this);
     $ff->setReturnReference('getFormElementById', $this->formElement, array('4'));
     $this->artifact->setReturnReference('getTracker', $this->tracker);
     $this->report->setReturnReference('getTracker', $this->tracker);
     $this->formElement->setReturnReference('getTracker', $this->tracker);
     $this->url = new Tracker_URLTestVersion($this);
     $this->url->setReturnReference('getTrackerFactory', $tf);
     $this->url->setReturnReference('getTracker_FormElementFactory', $ff);
     $this->url->setReturnReference('getArtifactFactory', $af);
     $this->url->setReturnReference('getArtifactReportFactory', $rf);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:28,代码来源:Tracker_URLTest.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     ForgeConfig::store();
     $this->factory = new TemplateRendererFactory();
     $this->plugin_templates_dir = dirname(__FILE__);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:TemplateRendererFactoryTest.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     $stats_formatter = mock('Statistics_Formatter');
     $this->usage_formatter = new Statistics_Services_UsageFormatter($stats_formatter);
     $this->first_input_datas = array(array('group_id' => 1, 'result' => 'res1'), array('group_id' => 87, 'result' => 'res2'), array('group_id' => 104, 'result' => 'res3'));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:Statistics_Services_UsageFormatterTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $this->field_id = 12;
     $this->ugroup_manager = mock('UGroupManager');
     $this->value_dao = mock('Tracker_FormElement_Field_List_Bind_Ugroups_ValueDao');
     $this->default_value_dao = mock('Tracker_FormElement_Field_List_Bind_DefaultvalueDao');
     $this->field = aSelectBoxField()->withId($this->field_id)->build();
     $this->root = new SimpleXMLElement('<bind type="ugroups" />');
     $this->xml_mapping = array();
     $this->integrators_ugroup_id = 103;
     $this->integrators_ugroup_name = 'Integrators';
     $this->integrators_ugroup = new ProjectUGroup(array('ugroup_id' => $this->integrators_ugroup_id, 'name' => $this->integrators_ugroup_name));
     $this->integrators_ugroup_value = new Tracker_FormElement_Field_List_Bind_UgroupsValue(345, $this->integrators_ugroup, false);
     $this->customers_ugroup_id = 104;
     $this->customers_ugroup_name = 'Customers';
     $this->customers_ugroup = new ProjectUGroup(array('ugroup_id' => $this->customers_ugroup_id, 'name' => $this->customers_ugroup_name));
     $this->customers_ugroup_value = new Tracker_FormElement_Field_List_Bind_UgroupsValue(687, $this->customers_ugroup, false);
     $this->project_members_ugroup_name = 'ugroup_project_members_name_key';
     $this->project_members_ugroup = new ProjectUGroup(array('ugroup_id' => ProjectUGroup::PROJECT_MEMBERS, 'name' => $this->project_members_ugroup_name));
     $this->project_members_ugroup_value = new Tracker_FormElement_Field_List_Bind_UgroupsValue(4545, $this->project_members_ugroup, false);
     $this->hidden_ugroup_id = 105;
     $this->hidden_ugroup_name = 'Unused ProjectUGroup';
     $this->hidden_ugroup = new ProjectUGroup(array('ugroup_id' => $this->hidden_ugroup_id, 'name' => $this->hidden_ugroup_name));
     $this->hidden_ugroup_value = new Tracker_FormElement_Field_List_Bind_UgroupsValue(666, $this->hidden_ugroup, true);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:26,代码来源:Tracker_FormElement_Field_List_Bind_UgroupsTest.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     ForgeConfig::set('codendi_log', '/tmp');
     $this->log_file = tempnam(ForgeConfig::get('codendi_log'), 'codendi_syslog');
     $this->logger = new BackendLogger($this->log_file);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:BackendLoggerTest.php

示例13: setUp

 public function setUp()
 {
     parent::setUp();
     $GLOBALS['Language'] = new MockBaseLanguage($this);
     $this->xml_security = new XML_Security();
     $this->xml_security->enableExternalLoadOfEntities();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:HudsonBuildTest.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $this->tracker_id = 666;
     $this->tracker = mock('Tracker');
     stub($this->tracker)->getId()->returns($this->tracker_id);
     $this->task_tracker = mock('Tracker');
     stub($this->task_tracker)->getId()->returns(42);
     $this->story_tracker = mock('Tracker');
     stub($this->story_tracker)->getId()->returns(69);
     $this->tracker_factory = mock('TrackerFactory');
     stub($this->tracker_factory)->getTrackerById(42)->returns($this->task_tracker);
     stub($this->tracker_factory)->getTrackerById(69)->returns($this->story_tracker);
     $this->status_field = aMockField()->withId(123)->withTracker($this->task_tracker)->build();
     $this->assignto_field = aMockField()->withId(321)->withTracker($this->story_tracker)->build();
     $this->stage_field = aMockField()->withId(322)->withTracker($this->story_tracker)->build();
     $this->element_factory = mock('Tracker_FormElementFactory');
     stub($this->element_factory)->getFieldById(123)->returns($this->status_field);
     stub($this->element_factory)->getFieldById(321)->returns($this->assignto_field);
     stub($this->element_factory)->getFieldById(322)->returns($this->stage_field);
     $existing_mappings = array(42 => new Cardwall_OnTop_Config_TrackerMappingStatus($this->task_tracker, array(), array(), $this->status_field), 69 => new Cardwall_OnTop_Config_TrackerMappingFreestyle($this->story_tracker, array(), array(), $this->stage_field));
     $this->dao = mock('Cardwall_OnTop_ColumnMappingFieldDao');
     $this->value_dao = mock('Cardwall_OnTop_ColumnMappingFieldValueDao');
     $this->command = new Cardwall_OnTop_Config_Command_UpdateMappingFields($this->tracker, $this->dao, $this->value_dao, $this->tracker_factory, $this->element_factory, $existing_mappings);
 }
开发者ID:nterray,项目名称:tuleap,代码行数:25,代码来源:UpdateMappingFieldsTest.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     $this->from = aFieldListStaticValue()->withId(123)->build();
     $this->to = aFieldListStaticValue()->withId(456)->build();
     PermissionsManager::setInstance(mock('PermissionsManager'));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:TransitionTest.php


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