/** * Test that confirmed, deleted tests are correctly retrieved */ public function testFetchConfirmedDeleted() { $ALERT = new ALERT(); $response = $ALERT->fetch(1, 1); // Make sure we only get one response $this->assertEquals(1, count($response['data'])); // Make sure the response has the correct attributes $this->assertEquals(1, $response['data'][0]['confirmed']); $this->assertEquals(1, $response['data'][0]['deleted']); }
mlog("Can't have both from/to and only!\n"); exit; } $active = 0; $queries = 0; $unregistered = 0; $registered = 0; $sentemails = 0; $LIVEALERTS = new ALERT(); $current_email = ''; $email_text = ''; $globalsuccess = 1; # Fetch all confirmed, non-deleted alerts $confirmed = 1; $deleted = 0; $alertdata = $LIVEALERTS->fetch($confirmed, $deleted); $alertdata = $alertdata['data']; $DEBATELIST = new DEBATELIST(); # Nothing debate specific, but has to be one of them $sects = array('', 'House of Representatives debate', 'Westminster Hall debate', 'Written Answer', 'Written Ministerial Statement', 'Northern Ireland Assembly debate'); $sects[101] = 'Lords debate'; $sects_short = array('', 'debate', 'westminhall', 'wrans', 'wms', 'ni'); $sects_short[101] = 'lords'; $results = array(); $outof = count($alertdata); $start_time = time(); foreach ($alertdata as $alertitem) { $active++; $email = $alertitem['email']; if ($onlyemail && $email != $onlyemail) { continue;