private function getValuesArray(\Application\AppointmentItem $appointment) { $values = array(); $values['start'] = $appointment->getTimeStart()->format('H:i'); $values['end'] = $appointment->getTimeEnd()->format('H:i'); $values['notes'] = $appointment->getNotes(); $values['submitted'] = $appointment->getSubmitted()->format('Y-m-d H:i:s'); $values['employee'] = $appointment->getEmpId(); return $values; }
/** * @depends testArrayFunctions * @param \Application\AppointmentItem $app */ public function testSetters(\Application\AppointmentItem $app) { $app->setTimeStart(new \DateTime('2015-10-15 10:27:00')); $this->assertEquals(new \DateTime('2015-10-15 10:27:00'), $app->getTimeStart()); $app->setTimeEnd(new \DateTime('2015-10-15 10:28:00')); $this->assertEquals(new \DateTime('2015-10-15 10:28:00'), $app->getTimeEnd()); $app->setChain(6); $this->assertEquals(6, $app->getChain()); $app->setNotes('other note'); $this->assertEquals('other note', $app->getNotes()); $app->setEmpId(20); $this->assertEquals(20, $app->getEmpId()); }