Beispiel #1
0
 public function itAppendsBreadCrumbsWithPushMethod()
 {
     $breadcrumb_merger = new BreadCrumb_Merger();
     $breadcrumb_merger->push($this->bc1);
     $breadcrumb_merger->push($this->bc2);
     $this->assertEqual(array('lvl1' => "Toto", 'lvl2' => "Tata", 'lvl3' => "Tutu"), $breadcrumb_merger->getCrumbs());
 }
 public function breadcrumbs()
 {
     $breadcrumbs_merger = new BreadCrumb_Merger();
     foreach (array_reverse($this->milestone->getAncestors()) as $milestone) {
         $breadcrumbs_merger->push(new BreadCrumb_Milestone($this->plugin_path, $milestone));
     }
     return $breadcrumbs_merger->getCrumbs();
 }
 /**
  * @return BreadCrumb_BreadCrumbGenerator
  */
 public function getBreadcrumbs($plugin_path)
 {
     $this->generateBareMilestone();
     if ($this->milestone->getArtifact()) {
         $breadcrumbs_merger = new BreadCrumb_Merger();
         $breadcrumbs_merger->push(new BreadCrumb_VirtualTopMilestone($plugin_path, $this->project));
         foreach (array_reverse($this->milestone->getAncestors()) as $milestone) {
             $breadcrumbs_merger->push(new BreadCrumb_Milestone($plugin_path, $milestone));
         }
         $breadcrumbs_merger->push(new BreadCrumb_Milestone($plugin_path, $this->milestone));
         return $breadcrumbs_merger;
     }
     return new BreadCrumb_NoCrumb();
 }