public function FeedTest::testPushImport in Feeds 8.3
@covers ::pushImport
File
- tests/
src/ Kernel/ Entity/ FeedTest.php, line 206
Class
- FeedTest
- @coversDefaultClass \Drupal\feeds\Entity\Feed @group feeds
Namespace
Drupal\Tests\feeds\Kernel\EntityCode
public function testPushImport() {
$feed = $this
->createFeed($this->feedType
->id());
$feed
->pushImport(file_get_contents($this
->resourcesPath() . '/rss/googlenewstz.rss2'));
// pushImport() is expected to put a job on a queue. Run all items from
// this queue.
$this
->runCompleteQueue('feeds_feed_refresh:' . $this->feedType
->id());
// Assert that 6 nodes have been created.
$this
->assertNodeCount(6);
}