public static function unitTest() { $response = ''; $response .= "<br/>starting Data Point tests <br/>"; $response .= 'Testing updateUserDataPoint: '; DataPoint::updateUserDataPoint(TEST_USER_ID, DataPoint::$BLOOD_PRESSURE, '121/50'); $value = DataPoint::getValueForDataPoint(DataPoint::$BLOOD_PRESSURE, TEST_USER_ID); if ($value == '121/50') { $response .= 'Passed'; } else { $response .= 'Failed'; } $response .= '<br/>'; $response .= 'Testing getHistoryListForDataPoint: '; $dataPointList = DataPoint::getHistoryListForDataPointAsArray(DataPoint::$BLOOD_PRESSURE, TEST_USER_ID); if (sizeof($dataPointList) > 0) { $response .= 'Passed'; } else { $response .= 'Failed'; } $response .= '<br/>'; $response .= 'Testing deleteDataPointHistory: '; DataPoint::deleteDataPointHistory(TEST_USER_ID, DataPoint::$BLOOD_PRESSURE); $dataPointList = DataPoint::getHistoryListForDataPointAsArray(DataPoint::$BLOOD_PRESSURE, TEST_USER_ID); if (sizeof($dataPointList) == 0) { $response .= 'Passed'; } else { $response .= 'Failed'; } $response .= '<br/>'; return $response; }