Example #1
0
 /**
  * @dataProvider provider
  */
 public function testCreateTime($username, $apiKey)
 {
     return;
     $start = new \DateTime();
     $start->setTime(12, 0, 0);
     $end = new \DateTime();
     $end->setTime(15, 15, 42);
     $diff = $end->diff($start);
     $time = new Time();
     $time->setProjectId(16054)->setDate(new \DateTime())->setStartTime($start)->setEndTime($end)->setComment('Donec id elit non mi porta gravida at eget metus.')->setMinutes($diff->i)->setTaskId(42);
     $customer = $this->getApi($username, $apiKey)->getCustomerByNumber(42);
     $time->setCustomer($customer);
     print_r($this->getApi($username, $apiKey)->createTime($time));
 }
Example #2
0
 /**
  * @param Time $time
  *
  * @return FbApi
  */
 public function deleteTime(Time $time)
 {
     return $this->call(new DeleteRequest('time.delete', array('time_id' => $time->getTimeId())));
 }