function AggregatorTestBase::deleteFeedItems

Same name in this branch
  1. 8.9.x core/modules/aggregator/src/Tests/AggregatorTestBase.php \Drupal\aggregator\Tests\AggregatorTestBase::deleteFeedItems()
Same name in other branches
  1. 9 core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php \Drupal\Tests\aggregator\Functional\AggregatorTestBase::deleteFeedItems()

Confirms an item removal from a feed.

Parameters

\Drupal\aggregator\FeedInterface $feed: Feed object representing the feed.

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

File

core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php, line 215

Class

AggregatorTestBase
Defines a base class for testing the Aggregator module.

Namespace

Drupal\Tests\aggregator\Functional

Code

public function deleteFeedItems(FeedInterface $feed) {
    $this->drupalPostForm('admin/config/services/aggregator/delete/' . $feed->id(), [], t('Delete items'));
    $this->assertRaw(t('The news items from %title have been deleted.', [
        '%title' => $feed->label(),
    ]), 'Feed items deleted.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.