コード例 #1
0
 public function getMilestoneContentPresenter(PFUser $user, Planning_ArtifactMilestone $milestone)
 {
     $redirect_paremeter = new Planning_MilestoneRedirectParameter();
     $backlog_strategy = $this->strategy_factory->getBacklogStrategy($milestone);
     $redirect_to_self = $redirect_paremeter->getPlanningRedirectToSelf($milestone, AgileDashboard_Milestone_Pane_Content_ContentPaneInfo::IDENTIFIER);
     return $backlog_strategy->getPresenter($user, $milestone, $this->collection_factory->getTodoCollection($user, $milestone, $backlog_strategy, $redirect_to_self), $this->collection_factory->getDoneCollection($user, $milestone, $backlog_strategy, $redirect_to_self), $this->collection_factory->getInconsistentCollection($user, $milestone, $backlog_strategy, $redirect_to_self), $redirect_to_self);
 }
 public function itNotSetInitialEffortForOpenStoriesIfUserCannotRead()
 {
     stub($this->dao)->getPlannedItemIds()->returns(array());
     $field = mock('Tracker_FormElement_Field_Float');
     stub($field)->getComputedValue()->returns(26);
     stub($field)->userCanRead()->returns(false);
     stub($this->factory)->getInitialEffortField()->returns($field);
     $content = $this->factory->getTodoCollection($this->user, $this->milestone, $this->backlog_strategy, $this->redirect_to_self);
     $row = $content->current();
     $this->assertEqual($row->points(), null);
 }