function FeedProcessorPluginTest::testDelete

Same name in other branches
  1. 8.9.x core/modules/aggregator/tests/src/Functional/FeedProcessorPluginTest.php \Drupal\Tests\aggregator\Functional\FeedProcessorPluginTest::testDelete()

Tests deleting functionality.

File

core/modules/aggregator/tests/src/Functional/FeedProcessorPluginTest.php, line 49

Class

FeedProcessorPluginTest
Tests the processor plugins functionality and discoverability.

Namespace

Drupal\Tests\aggregator\Functional

Code

public function testDelete() {
    $feed = $this->createFeed();
    $description = $feed->description->value ?: '';
    $this->updateAndDelete($feed, NULL);
    // Make sure the feed title is changed.
    $entities = \Drupal::entityTypeManager()->getStorage('aggregator_feed')
        ->loadByProperties([
        'description' => $description,
    ]);
    $this->assertEmpty($entities);
}

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