public function QueueTest::testPushImport in Feeds 8.3
Tests if a feed gets imported via a push.
File
- tests/
src/ Functional/ QueueTest.php, line 34
Class
- QueueTest
- Tests behavior involving the queue.
Namespace
Drupal\Tests\feeds\FunctionalCode
public function testPushImport() {
$feed_type = $this
->createFeedType();
// Create a feed without a source.
$feed = $this
->createFeed($feed_type
->id());
// Push file contents.
$feed
->pushImport(file_get_contents($this
->resourcesPath() . '/rss/googlenewstz.rss2'));
// Run cron to import.
$this
->cronRun();
// Assert that 6 nodes have been created.
$this
->assertNodeCount(6);
}