public function AggregatorTestBase::deleteFeedItems in Drupal 8
Same name in this branch
- 8 core/modules/aggregator/src/Tests/AggregatorTestBase.php \Drupal\aggregator\Tests\AggregatorTestBase::deleteFeedItems()
- 8 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.
1 call to AggregatorTestBase::deleteFeedItems()
- AggregatorTestBase::updateAndDelete in core/
modules/ aggregator/ src/ Tests/ AggregatorTestBase.php - Adds and deletes feed items and ensure that the count is zero.
File
- core/
modules/ aggregator/ src/ Tests/ AggregatorTestBase.php, line 220
Class
- AggregatorTestBase
- Defines a base class for testing the Aggregator module.
Namespace
Drupal\aggregator\TestsCode
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.');
}