Exemple #1
0
 public function itGetsTheLinkedArtifactsOfChildNodes()
 {
     $root_artifact = aMockArtifact()->withId(9999)->withTitle('root artifact')->build();
     $linked_artifact_1 = aMockArtifact()->build();
     $linked_artifact_2 = aMockArtifact()->build();
     $artifact = aMockArtifact()->withId(1111)->withUniqueLinkedArtifacts(array($linked_artifact_1, $linked_artifact_2))->build();
     $planned_artifacts = aNode()->withObject($root_artifact)->withChild(aNode()->withObject($artifact))->build();
     $milestone = new Planning_ArtifactMilestone($this->project, mock('Planning'), $root_artifact, $planned_artifacts);
     $all_artifacts = $milestone->getLinkedArtifacts(mock('User'));
     $this->assertEqual(count($all_artifacts), 3);
 }