public function itMayHavePlannedArtifacts() { $this->assertEqual($this->milestone->getPlannedArtifacts(), null); $planned_artifacts = new ArtifactNode(aMockArtifact()->build()); $this->milestone = new Planning_ArtifactMilestone($this->project, $this->planning, $this->artifact, $planned_artifacts); $this->assertEqual($this->milestone->getPlannedArtifacts(), $planned_artifacts); }
/** * @return Cardwall_PaneContentPresenter */ private function getPresenterUsingMappedFields(Cardwall_OnTop_Config_ColumnCollection $columns) { $board_factory = new Cardwall_BoardFactory(); $planned_artifacts = $this->milestone->getPlannedArtifacts(); $field_retriever = new Cardwall_OnTop_Config_MappedFieldProvider($this->config, new Cardwall_FieldProviders_SemanticStatusFieldRetriever()); $board = $board_factory->getBoard($field_retriever, $columns, $planned_artifacts, $this->config); $backlog_title = $this->milestone->getPlanning()->getBacklogTracker()->getName(); $redirect_parameter = 'cardwall[agile][' . $this->milestone->getPlanning()->getId() . ']=' . $this->milestone->getArtifactId(); $configure_url = TRACKER_BASE_URL . '/?tracker=' . $this->milestone->getTrackerId() . '&func=admin-cardwall'; return new Cardwall_PaneContentPresenter($board, $this->getQrCode(), $redirect_parameter, $backlog_title, $configure_url); }
/** * @return TreeNode */ private function buildPlannedArtifactsTree($child_depth = 1) { $presenter_root_node = null; if ($this->canAccessPlannedItem()) { $root_node = $this->milestone->getPlannedArtifacts(); //TODO use null object pattern while still possible? if ($root_node) { $card_mapper = new TreeNodeMapper(new Planning_ItemCardPresenterCallback($this->milestone->getPlanning(), new Tracker_CardFields(), 'planning-draggable-alreadyplanned')); $presenter_root_node = $card_mapper->map($root_node); } } return $presenter_root_node; }