當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。