public function QueueTest::testPushImportWithSavedSource in Feeds 8.3
Tests on a push import, if only the file pushed is imported.
File
- tests/
src/ Functional/ QueueTest.php, line 53
Class
- QueueTest
- Tests behavior involving the queue.
Namespace
Drupal\Tests\feeds\FunctionalCode
public function testPushImportWithSavedSource() {
$feed_type = $this
->createFeedType();
// Create a feed with a source.
$feed = $this
->createFeed($feed_type
->id(), [
'source' => $this
->resourcesUrl() . '/rss/drupalplanet.rss2',
]);
// 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);
}