queue_script-D8.php

  1. 8.0.x tests/resources/queue_script-D8.php
  2. 7.x tests/resources/queue_script-D8.php
  3. master tests/resources/queue_script-D8.php

File

tests/resources/queue_script-D8.php
View source
  1. <?php
  2. use Drupal\aggregator\Entity\Feed;
  3. // Create a new feed.
  4. $feed = Feed::create(array(
  5. 'title' => 'test',
  6. 'url' => 'http://drupal.org/project/issues/rss/drupal?categories=All',
  7. 'refresh' => 3600,
  8. ));
  9. $feed->save();
  10. // Let cron call QueueInterface::createItem() for us.
  11. aggregator_cron();