public function itHasAllTriggeringFields()
 {
     $child_tracker = aTracker()->withId(200)->build();
     $this->target_tracker->setChildren(array($child_tracker));
     expect($this->formelement_factory)->getUsedStaticSbFields()->count(2);
     expect($this->formelement_factory)->getUsedStaticSbFields($child_tracker)->at(1);
     stub($this->formelement_factory)->getUsedStaticSbFields()->returnsEmptyDar();
     $this->factory->getForTracker($this->target_tracker);
 }
Esempio n. 2
0
 /**
  * @return \Tracker
  */
 public function build()
 {
     $tracker = new Tracker($this->id, $this->project_id, $this->name, null, $this->item_name, null, null, null, null, null, null, null, null, null);
     if ($this->project) {
         $tracker->setProject($this->project);
     }
     if ($this->children !== null) {
         $tracker->setChildren($this->children);
     }
     if ($this->parent !== false) {
         $tracker->setParent($this->parent);
     }
     return $tracker;
 }