You are here

public function FeedProcessorPluginTest::testPostProcess in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/aggregator/src/Tests/FeedProcessorPluginTest.php \Drupal\aggregator\Tests\FeedProcessorPluginTest::testPostProcess()

Test post-processing functionality.

File

core/modules/aggregator/src/Tests/FeedProcessorPluginTest.php, line 60
Contains \Drupal\aggregator\Tests\FeedProcessorPluginTest.

Class

FeedProcessorPluginTest
Tests the processor plugins functionality and discoverability.

Namespace

Drupal\aggregator\Tests

Code

public function testPostProcess() {
  $feed = $this
    ->createFeed(NULL, array(
    'refresh' => 1800,
  ));
  $this
    ->updateFeedItems($feed);
  $feed_id = $feed
    ->id();

  // Reset entity cache manually.
  \Drupal::entityManager()
    ->getStorage('aggregator_feed')
    ->resetCache(array(
    $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);
}