function FeedProcessorPluginTest::testPostProcess

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

Test post-processing functionality.

File

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

Class

FeedProcessorPluginTest
Tests the processor plugins functionality and discoverability.

Namespace

Drupal\Tests\aggregator\Functional

Code

public function testPostProcess() {
    $feed = $this->createFeed(NULL, [
        'refresh' => 1800,
    ]);
    $this->updateFeedItems($feed);
    $feed_id = $feed->id();
    // Reset entity cache manually.
    \Drupal::entityTypeManager()->getStorage('aggregator_feed')
        ->resetCache([
        $feed_id,
    ]);
    // Reload the feed to get new values.
    $feed = Feed::load($feed_id);
    // Make sure its refresh rate doubled.
    $this->assertEqual($feed->getRefreshRate(), 3600);
}

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