Пример #1
0
 /**
  * Add a date to this loco
  * @since Version 3.2
  * @param int $dateId
  * @param string $dateDate
  * @param string $dateText
  * @return boolean
  */
 public function addDate($dateId = false, $dateDate = false, $dateText = false)
 {
     $Date = new Date();
     $Date->action = $dateText;
     $Date->action_id = $dateId;
     $Date->Date = new DateTime($dateDate);
     $Date->commit();
     return true;
 }
Пример #2
0
 /**
  * @depends testAddLoco
  */
 public function test_addDate($loco_id)
 {
     $TestLoco = LocosFactory::CreateLocomotive($loco_id);
     $Date = new Date();
     $Date->Loco = $TestLoco;
     $Date->Date = new DateTime();
     $Date->action_id = 1;
     $Date->meta = ["test" => "blalh"];
     $Date->commit();
     $id = $Date->id;
     $Date = new Date($id);
 }