本文整理汇总了PHP中TuleapTestCase类的典型用法代码示例。如果您正苦于以下问题:PHP TuleapTestCase类的具体用法?PHP TuleapTestCase怎么用?PHP TuleapTestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TuleapTestCase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: tearDown
public function tearDown()
{
$this->zip->close();
$this->archive->cleanUp();
//`rm -rf $this->tmp_dir/import_project_*`;
parent::tearDown();
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:XMLImportZipArchiveTest.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->ldap = mock('LDAP');
stub($this->ldap)->getLDAPParam('dn')->returns('dc=tuleap,dc=com');
$this->apache = new LDAP_SVN_Apache($this->ldap, mock('LDAP_ProjectManager'), array());
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:LDAP_SVN_ApacheTest.php
示例5: setUp
public function setUp()
{
parent::setUp();
$this->templates_dir = dirname(__FILE__) . '/templates';
$this->renderer = new MustacheDebugRenderer($this->templates_dir);
$this->presenter = new MustacheDebugRenderer_DummyPresenter();
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:MustacheDebugRendererTest.php
示例6: 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
示例7: 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
示例8: 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
示例9: mock
function __construct($name = 'Chageset Value List Test')
{
parent::__construct($name);
$this->field_class = 'MockTracker_FormElement_Field_List';
$this->changesetvalue_class = 'Tracker_Artifact_ChangesetValue_List';
$this->user = mock('PFUser');
}
开发者ID:amanikamail,项目名称:tuleap,代码行数:7,代码来源:Tracker_Artifact_ChangesetValue_ListTest.php
示例10: 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
示例11: 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
示例12: 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
示例13: 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
示例14: setUp
public function setUp()
{
parent::setUp();
$this->milestone_1_id = 132;
$this->milestone_1 = stub('Planning_ArtifactMilestone')->getArtifactId()->returns($this->milestone_1_id);
$this->milestone_2_id = 853;
$this->milestone_2 = stub('Planning_ArtifactMilestone')->getArtifactId()->returns($this->milestone_2_id);
$this->virtual_top_milestone = stub('Planning_VirtualTopMilestone')->getArtifactId()->returns(null);
$this->strategy_1 = mock('AgileDashboard_Milestone_Backlog_DescendantBacklogStrategy');
$this->strategy_2 = mock('AgileDashboard_Milestone_Backlog_DescendantBacklogStrategy');
$this->strategy_factory = mock('AgileDashboard_Milestone_Backlog_BacklogStrategyFactory');
stub($this->strategy_factory)->getBacklogStrategy($this->milestone_1)->returns($this->strategy_1);
stub($this->strategy_factory)->getBacklogStrategy($this->milestone_2)->returns($this->strategy_2);
$this->backlog_item_collection_factory = mock('AgileDashboard_Milestone_Backlog_BacklogItemCollectionFactory');
$this->sequence_id_manager = new AgileDashboard_SequenceIdManager($this->strategy_factory, $this->backlog_item_collection_factory);
$this->user = aUser()->build();
$this->artifact_id_1 = 123;
$this->artifact_id_2 = 456;
$this->artifact_id_3 = 789;
$this->artifact_1 = anArtifact()->withId($this->artifact_id_1)->build();
$this->artifact_2 = anArtifact()->withId($this->artifact_id_2)->build();
$this->artifact_3 = anArtifact()->withId($this->artifact_id_3)->build();
$this->artifact_id_4 = 254;
$this->artifact_id_5 = 255;
$this->artifact_id_6 = 256;
$this->artifact_4 = anArtifact()->withId($this->artifact_id_4)->build();
$this->artifact_5 = anArtifact()->withId($this->artifact_id_5)->build();
$this->artifact_6 = anArtifact()->withId($this->artifact_id_6)->build();
$this->backlog_item_1 = stub('AgileDashboard_Milestone_Backlog_BacklogItem')->getArtifact()->returns($this->artifact_1);
$this->backlog_item_2 = stub('AgileDashboard_Milestone_Backlog_BacklogItem')->getArtifact()->returns($this->artifact_2);
$this->backlog_item_3 = stub('AgileDashboard_Milestone_Backlog_BacklogItem')->getArtifact()->returns($this->artifact_3);
$this->items_collection = new AgileDashboard_Milestone_Backlog_BacklogItemCollection();
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:33,代码来源:SequenceIdManagerTest.php
示例15: 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
示例16: setUp
public function setUp()
{
parent::setUp();
$tracker_factory = mock('TrackerFactory');
$this->xml_importer = mock('Tracker_Artifact_XMLImport');
$this->artifact_factory = mock('Tracker_ArtifactFactory');
$this->children_collector = new Tracker_XML_ChildrenCollector();
$this->importer = new Tracker_XML_Importer_ChildrenXMLImporter($this->xml_importer, $tracker_factory, $this->artifact_factory, $this->children_collector);
$this->artifacts_imported_mapping = mock('Tracker_XML_Importer_ArtifactImportedMapping');
$this->tracker = aTracker()->withId(23)->build();
stub($tracker_factory)->getTrackerById(23)->returns($this->tracker);
$this->tracker_2 = aTracker()->withId(24)->build();
stub($tracker_factory)->getTrackerById(24)->returns($this->tracker_2);
$this->user = aUser()->build();
$artlink_field = anArtifactLinkField()->withId($this->field_id)->build();
$artlink_field_2 = anArtifactLinkField()->withId($this->field_id_2)->build();
$root_artifact_id = 456;
$this->root_artifact = mock('Tracker_Artifact');
stub($this->root_artifact)->getId()->returns($root_artifact_id);
stub($this->root_artifact)->getAnArtifactLinkField($this->user)->returns($artlink_field);
stub($this->artifact_factory)->getArtifactById($root_artifact_id)->returns($this->root_artifact);
$this->created_artifact = mock('Tracker_Artifact');
stub($this->created_artifact)->getId()->returns(1023);
stub($this->created_artifact)->getAnArtifactLinkField($this->user)->returns($artlink_field_2);
stub($this->artifact_factory)->getArtifactById(1023)->returns($this->created_artifact);
$this->another_child_artifact = anArtifact()->withId(1024)->build();
stub($this->artifact_factory)->getArtifactById(1024)->returns($this->another_child_artifact);
}
开发者ID:amanikamail,项目名称:tuleap,代码行数:28,代码来源:ChildrenXMLImporterTest.php
示例17: setUp
public function setUp()
{
parent::setUp();
$this->planning1 = mock('Planning');
$this->planning2 = mock('Planning');
$this->plannings = array($this->planning1, $this->planning2);
stub($this->planning1)->getName()->returns('abcd');
stub($this->planning2)->getName()->returns('abcd');
stub($this->planning1)->getPlanTitle()->returns('efgh');
stub($this->planning2)->getPlanTitle()->returns('efgh');
stub($this->planning1)->getPlanningTrackerId()->returns('ijklmon');
stub($this->planning2)->getPlanningTrackerId()->returns('ijklmon');
stub($this->planning1)->getBacklogTitle()->returns('p q r');
stub($this->planning2)->getBacklogTitle()->returns('p q r');
$backlog_tracker1 = mock('Tracker');
$backlog_tracker2 = mock('Tracker');
stub($backlog_tracker1)->getId()->returns('stu vw x y z');
stub($backlog_tracker2)->getId()->returns('stu vw x y z');
stub($this->planning1)->getBacklogTrackers()->returns(array($backlog_tracker1));
stub($this->planning2)->getBacklogTrackers()->returns(array($backlog_tracker2));
$data = '<?xml version="1.0" encoding="UTF-8"?>
<plannings />';
$this->xml_tree = new SimpleXMLElement($data);
$this->xml_validator = mock('XML_RNGValidator');
$this->planning_permissions_manager = mock('PlanningPermissionsManager');
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:26,代码来源:XMLExporterTest.php
示例18: setUp
public function setUp()
{
parent::setUp();
/*
Product Epic
Release ----,-- Story
Sprint ---' Task
*/
$this->user = aUser()->build();
$this->release_tracker_id = 101;
$this->sprint_tracker_id = 1001;
$this->task_tracker_project_id = 200;
$this->epic_tracker = aTracker()->withId('epic')->withParent(null)->build();
$this->story_tracker = aTracker()->withId('story')->withParent($this->epic_tracker)->build();
$this->task_tracker = aTracker()->withId('task')->withProjectId($this->task_tracker_project_id)->withParent($this->story_tracker)->build();
$this->product_tracker = aTracker()->withId('product')->withParent(null)->build();
$this->release_tracker = aTracker()->withId($this->release_tracker_id)->withParent($this->product_tracker)->build();
$this->sprint_tracker = aTracker()->withId($this->sprint_tracker_id)->withParent($this->epic_tracker)->build();
$release_planning = stub('Planning')->getPlanningTracker()->returns($this->release_tracker);
$sprint_planning = stub('Planning')->getPlanningTracker()->returns($this->sprint_tracker);
$top_planning = stub('Planning')->getBacklogTrackersIds()->returns(array($this->release_tracker_id, $this->sprint_tracker_id));
$this->planning_factory = mock('PlanningFactory');
stub($this->planning_factory)->getPlanningByPlanningTracker($this->product_tracker)->returns(null);
stub($this->planning_factory)->getPlanningByPlanningTracker($this->release_tracker)->returns($release_planning);
stub($this->planning_factory)->getPlanningByPlanningTracker($this->sprint_tracker)->returns($sprint_planning);
stub($this->planning_factory)->getVirtualTopPlanning($this->user, $this->task_tracker_project_id)->returns($top_planning);
$this->hierarchy_factory = mock('Tracker_HierarchyFactory');
stub($this->hierarchy_factory)->getAllParents($this->sprint_tracker)->returns(array($this->release_tracker, $this->product_tracker));
$this->dao = mock('AgileDashboard_Milestone_MilestoneDao');
stub($this->dao)->getAllMilestoneByTrackers(array($this->release_tracker_id, $this->sprint_tracker_id))->returnsDar(array('m101_id' => '123', 'm101_title' => 'Tuleap 6.5', 'm1001_id' => '1231', 'm1001_title' => 'Sprint 31'), array('m101_id' => '123', 'm101_title' => 'Tuleap 6.5', 'm1001_id' => '1232', 'm1001_title' => 'Sprint 32'), array('m101_id' => '124', 'm101_title' => 'Tuleap 6.6', 'm1001_id' => '1241', 'm1001_title' => 'Sprint 33'));
$this->nearest_planning_tracker_provider = mock('AgileDashboard_Planning_NearestPlanningTrackerProvider');
$this->provider = new AgileDashboard_Milestone_MilestoneReportCriterionOptionsProvider($this->nearest_planning_tracker_provider, $this->dao, $this->hierarchy_factory, $this->planning_factory);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:33,代码来源:MilestoneReportCriterionOptionsProviderTest.php
示例19: setUp
public function setUp()
{
parent::setUp();
$tracker_user_story_id = 103;
$user_story_id = 107;
$submitted_by = 102;
$submitted_on = 1234567890;
$use_artifact_permissions = false;
$tracker = aMockTracker()->withId($this->tracker_id)->build();
$this->layout = mock('Tracker_IDisplayTrackerLayout');
$this->request = aRequest()->with('func', 'artifact-update')->build();
$this->user = mock('PFUser');
$this->formelement_factory = mock('Tracker_FormElementFactory');
$this->hierarchy_factory = mock('Tracker_HierarchyFactory');
$this->computed_field = mock('Tracker_FormElement_Field_Computed');
$this->us_computed_field = mock('Tracker_FormElement_Field_Computed');
$this->user_story = mock('Tracker_Artifact');
$tracker_user_story = aMockTracker()->withId($tracker_user_story_id)->build();
stub($this->user_story)->getTrackerId()->returns($tracker_user_story_id);
stub($this->user_story)->getTracker()->returns($tracker_user_story);
stub($this->user_story)->getId()->returns($user_story_id);
$this->task = partial_mock('Tracker_Artifact', array('createNewChangeset'), array($this->artifact_id, $this->tracker_id, $submitted_by, $submitted_on, $use_artifact_permissions));
$this->task->setHierarchyFactory($this->hierarchy_factory);
$this->task->setTracker($tracker);
$this->task->setFormElementFactory($this->formelement_factory);
stub($this->task)->createNewChangeset()->returns(true);
stub($this->formelement_factory)->getComputableFieldByNameForUser($tracker_user_story_id, Tracker::REMAINING_EFFORT_FIELD_NAME, $this->user)->returns($this->us_computed_field);
stub($this->computed_field)->fetchCardValue($this->task)->returns(42);
stub($this->us_computed_field)->fetchCardValue($this->user_story)->returns(23);
$this->event_manager = mock('EventManager');
$this->action = new Tracker_Action_UpdateArtifact($this->task, $this->formelement_factory, $this->event_manager);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:32,代码来源:UpdateArtifactTest.php
示例20: setUp
public function setUp()
{
parent::setUp();
ForgeConfig::store();
ForgeConfig::set('sys_logger_level', 'debug');
$this->ldap = partial_mock('LDAP', array('search'), array($this->ldap_params, mock('TruncateLevelLogger'), new LdapQueryEscaper()));
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:LDAPTest.php
注:本文中的TuleapTestCase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论