function FeedProcessorPluginTest::testDelete

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

Test deleting functionality.

File

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

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->assertTrue(empty($entities));
}

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