Beispiel #1
0
 /**
  * 
  * @param int $tracker_id
  * @param int $source_field_id
  * @param int $target_field_id
  * @param string $comparator
  * @throws Tracker_Rule_Date_Exception
  */
 public function insert(Tracker_Rule_Date $rule)
 {
     if (!in_array($rule->getComparator(), Tracker_Rule_Date::$allowed_comparators)) {
         throw new Tracker_Rule_Date_Exception('Invalid Comparator');
     }
     $rule_id = $this->dao->insert($rule->getTrackerId(), $rule->getSourceFieldId(), $rule->getTargetFieldId(), $rule->getComparator());
     $rule->setId($rule_id);
 }
Beispiel #2
0
 public function testGetTrackerFieldIdReturnsTrackerIdSet()
 {
     $this->date_rule->setTrackerId(45);
     $this->assertEqual(45, $this->date_rule->getTrackerId());
 }