Adds and removes feed items and ensure that the count is zero.
$feed: Feed object representing the feed.
$expected_count: Expected number of feed items.
function updateAndRemove($feed, $expected_count) {
$this
->updateFeedItems($feed, $expected_count);
$count = db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', array(
':fid' => $feed->fid,
))
->fetchField();
$this
->assertTrue($count);
$this
->removeFeedItems($feed);
$count = db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', array(
':fid' => $feed->fid,
))
->fetchField();
$this
->assertTrue($count == 0);
}