public function testEndDateChange() { $meetingsSql = "UPDATE meetings AS a INNER JOIN meetings AS b ON a.id = b.id SET a.date_end = date_add(b.date_start, INTERVAL + concat(b.duration_hours, b.duration_minutes) HOUR_MINUTE) WHERE a.id = '{$this->_meetingId}'"; $GLOBALS['db']->query($meetingsSql); $meeting = new Meeting(); $meeting->disable_row_level_security = true; $meeting->retrieve($this->_meetingId); $meeting->fixUpFormatting(); $this->assertEquals($meeting->date_end, '2010-10-12 00:15:00', 'Ensuring that the end_date is saved properly as a date time field'); }