Creates and ensures that a feed is unique, checks source, and deletes feed.
function testAddFeed() {
$feed = $this
->createFeed();
// Check feed data.
$this
->assertEqual($this
->getUrl(), url('admin/config/services/aggregator/add/feed', array(
'absolute' => TRUE,
)), 'Directed to correct url.');
$this
->assertTrue($this
->uniqueFeed($feed
->label(), $feed->url->value), 'The feed is unique.');
// Check feed source.
$this
->drupalGet('aggregator/sources/' . $feed
->id());
$this
->assertResponse(200, 'Feed source exists.');
$this
->assertText($feed
->label(), 'Page title');
$this
->drupalGet('aggregator/sources/' . $feed
->id() . '/categorize');
$this
->assertResponse(200, 'Feed categorization page exists.');
$this
->assertText($feed
->label());
// Delete feed.
$this
->deleteFeed($feed);
}