public function tearDown()
 {
     $this->zip->close();
     $this->archive->cleanUp();
     //`rm -rf $this->tmp_dir/import_project_*`;
     parent::tearDown();
 }
Exemplo n.º 2
0
 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);
 }
 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);
 }
Exemplo n.º 4
0
 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());
 }
 public function setUp()
 {
     parent::setUp();
     $this->templates_dir = dirname(__FILE__) . '/templates';
     $this->renderer = new MustacheDebugRenderer($this->templates_dir);
     $this->presenter = new MustacheDebugRenderer_DummyPresenter();
 }
Exemplo n.º 6
0
 public function setUp()
 {
     parent::setUp();
     $this->dao = mock('Openid_Dao');
     $this->driver = mock('Openid_Driver_ConnexionDriver');
     $this->connexion_manager = new Openid_ConnexionManager($this->driver);
 }
Exemplo n.º 7
0
 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);
 }
 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);
 }
 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');
 }
Exemplo n.º 10
0
 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);
 }
 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'));
 }
Exemplo n.º 12
0
 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);
 }
Exemplo n.º 13
0
 public function setUp()
 {
     parent::setUp();
     $this->artifact = anArtifact()->withId(9787)->build();
     $this->data = array('somekey' => 'somevalue');
     $this->node = new ArtifactNode($this->artifact, $this->data);
 }
Exemplo n.º 14
0
 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();
 }
 public function setUp()
 {
     parent::setUp();
     $this->wiki_page = mock('WikiPage');
     $this->group_id = 101;
     $this->actions = mock('FullTextSearchWikiActions');
 }
Exemplo n.º 16
0
 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);
 }
Exemplo n.º 17
0
 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');
 }
 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);
 }
Exemplo n.º 19
0
 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);
 }
Exemplo n.º 20
0
 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()));
 }
Exemplo n.º 21
0
 public function tearDown()
 {
     unset($GLOBALS['sys_force_ssl']);
     unset($GLOBALS['sys_https_host']);
     unset($GLOBALS['sys_default_domain']);
     parent::tearDown();
 }
 public function setUp()
 {
     parent::setUp();
     $this->bind = partial_mock('Tracker_FormElement_Field_List_Bind4Tests', array('getAllValues'));
     $this->v1 = mock('Tracker_FormElement_Field_List_BindValue');
     $this->v2 = mock('Tracker_FormElement_Field_List_BindValue');
 }
Exemplo n.º 23
0
 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);
 }
Exemplo n.º 24
0
 public function setUp()
 {
     parent::setUp();
     $this->permissions_factory = mock('Workflow_Transition_Condition_Permissions_Factory');
     $this->fieldnotempty_factory = mock('Workflow_Transition_Condition_FieldNotEmpty_Factory');
     $this->condition_factory = new Workflow_Transition_ConditionFactory($this->permissions_factory, $this->fieldnotempty_factory);
 }
Exemplo n.º 25
0
 public function tearDown()
 {
     foreach ($_SESSION as $key => $nop) {
         unset($_SESSION[$key]);
     }
     parent::tearDown();
 }
Exemplo n.º 26
0
 public function setUp()
 {
     parent::setUp();
     $this->factory = mock('PlanningFactory');
     $this->kanban_factory = mock('AgileDashboard_KanbanFactory');
     $this->validator = new Planning_RequestValidator($this->factory, $this->kanban_factory);
 }
Exemplo n.º 27
0
 public function setUp()
 {
     parent::setUp();
     $this->bc1 = stub('BreadCrumb_BreadCrumbGenerator')->getCrumbs()->returns(array('lvl1' => "Toto", 'lvl2' => "Tata"));
     $this->bc2 = stub('BreadCrumb_BreadCrumbGenerator')->getCrumbs()->returns(array('lvl3' => "Tutu"));
     $this->bc3 = stub('BreadCrumb_BreadCrumbGenerator')->getCrumbs()->returns(array('lvl4' => "Tralala"));
 }
Exemplo n.º 28
0
 public function setUp()
 {
     parent::setUp();
     $this->response = mock('Git_GitoliteHousekeeping_GitoliteHousekeepingResponse');
     $this->dao = mock('Git_GitoliteHousekeeping_GitoliteHousekeepingDao');
     $this->command = new Git_GitoliteHousekeeping_ChainOfResponsibility_EnableGitGc($this->response, $this->dao);
 }
Exemplo n.º 29
0
 public function setUp()
 {
     parent::setUp();
     $this->plugin = mock('gitPlugin');
     $this->driver = mock('GitDriver');
     $this->gitconfig = new GitConfig($this->plugin, $this->driver);
 }
 public function tearDown()
 {
     UserManager::clearInstance();
     ProjectManager::clearInstance();
     SystemEventManager::clearInstance();
     parent::tearDown();
 }