public function DirectoryFetcherTest::testImportSingleFile in Feeds 8.3
Tests importing a feed using the directory fetcher.
File
- tests/
src/ Kernel/ Feeds/ Fetcher/ DirectoryFetcherTest.php, line 38
Class
- DirectoryFetcherTest
- @coversDefaultClass \Drupal\feeds\Feeds\Fetcher\DirectoryFetcher @group feeds
Namespace
Drupal\Tests\feeds\Kernel\Feeds\FetcherCode
public function testImportSingleFile() {
// Create a feed and import file.
$feed = $this
->createFeed($this->feedType
->id(), [
'source' => $this
->resourcesPath() . '/rss/googlenewstz.rss2',
]);
$feed
->import();
// Assert that 6 nodes have been created.
static::assertEquals(6, $feed
->getItemCount());
$this
->assertNodeCount(6);
}