function AggregatorTestBase::removeFeedItems

Confirms an item removal from a feed.

Parameters

\Drupal\aggregator\Plugin\Core\Entity\Feed $feed: Feed object representing the feed.

4 calls to AggregatorTestBase::removeFeedItems()
AggregatorCronTest::testCron in drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorCronTest.php
Adds feeds and updates them via cron process.
AggregatorTestBase::updateAndRemove in drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php
Adds and removes feed items and ensure that the count is zero.
FeedFetcherPluginTest::testfetch in drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/FeedFetcherPluginTest.php
Test fetching functionality.
UpdateFeedItemTest::testUpdateFeedItem in drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/UpdateFeedItemTest.php
Tests running "update items" from 'admin/config/services/aggregator' page.

File

drupal/core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php, line 188
Definition of Drupal\aggregator\Tests\AggregatorTestBase.

Class

AggregatorTestBase
Defines a base class for testing the Aggregator module.

Namespace

Drupal\aggregator\Tests

Code

function removeFeedItems(Feed $feed) {
  $this
    ->drupalPost('admin/config/services/aggregator/remove/' . $feed
    ->id(), array(), t('Remove items'));
  $this
    ->assertRaw(t('The news items from %title have been removed.', array(
    '%title' => $feed
      ->label(),
  )), 'Feed items removed.');
}