示例#1
0
function api_getAlerts_start_date($start_date)
{
    $args = array('start_date' => $start_date, 'end_date' => get_http_var('end_date'));
    $alert = new ALERT();
    $data = $alert->fetch_between($confirmed = 1, $deleted = 0, $args['start_date'], $args['end_date']);
    api_output($data);
}
示例#2
0
 /**
  * Test that the correct alerts between given dates are retrieved
  */
 public function testFetchBetween()
 {
     $ALERT = new ALERT();
     $response = $ALERT->fetch_between(1, 1, '2014-02-01', '2014-02-02');
     // Make sure we only get one response
     $this->assertEquals(1, count($response['alerts']));
 }