function AggregatorTestBase::deleteFeed

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

Deletes an aggregator feed.

Parameters

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

File

core/modules/aggregator/src/Tests/AggregatorTestBase.php, line 97

Class

AggregatorTestBase
Defines a base class for testing the Aggregator module.

Namespace

Drupal\aggregator\Tests

Code

public function deleteFeed(FeedInterface $feed) {
    $this->drupalPostForm('aggregator/sources/' . $feed->id() . '/delete', [], t('Delete'));
    $this->assertRaw(t('The feed %title has been deleted.', [
        '%title' => $feed->label(),
    ]), 'Feed deleted successfully.');
}

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