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 itCreatesContentWithOneElementInDone() { stub($this->dao)->getPlannedItemIds()->returns(array()); stub($this->form_element_factory)->getUsedFieldByNameForUser()->returns(aMockField()->build()); $content = $this->factory->getDoneCollection($this->user, $this->milestone, $this->backlog_strategy, $this->redirect_to_self); $row = $content->current(); $this->assertEqual($row->id(), $this->closed_story_id); }