public function FeedsDrushCommandsTest::testImportFeed in Feeds 8.3
@covers ::importFeed
File
- tests/
src/ Functional/ Commands/ FeedsDrushCommandsTest.php, line 127
Class
- FeedsDrushCommandsTest
- @coversDefaultClass \Drupal\feeds\Commands\FeedsDrushCommands @group feeds
Namespace
Drupal\Tests\feeds\Functional\CommandsCode
public function testImportFeed() {
// Create a feed.
$feed = $this
->createFeed($this->feedType
->id(), [
'title' => 'Foo',
'source' => $this
->resourcesPath() . '/rss/drupalplanet.rss2',
]);
// Import feed using drush.
$this
->drush('feeds:import', [
$feed
->id(),
]);
$this
->assertStringContainsString('Created 25 Article items.', $this
->getErrorOutput());
$this
->assertNodeCount(25);
$node = Node::load(1);
$this
->assertEquals('Adaptivethemes: Why I killed Node, may it RIP', $node->title->value);
}