public function DirectoryFetcherTest::testRecursiveFetchDir in Feeds 8.3
Tests fetching a directory resursively.
@covers ::fetch
File
- tests/
src/ Unit/ Feeds/ Fetcher/ DirectoryFetcherTest.php, line 104
Class
- DirectoryFetcherTest
- @coversDefaultClass \Drupal\feeds\Feeds\Fetcher\DirectoryFetcher @group feeds
Namespace
Drupal\Tests\feeds\Unit\Feeds\FetcherCode
public function testRecursiveFetchDir() {
$this->fetcher
->setConfiguration([
'recursive_scan' => TRUE,
]);
$result = $this->fetcher
->fetch($this->feed, $this->state);
$this
->assertSame($this->state->total, 3);
$this
->assertSame('vfs://feeds/test_file_1.txt', $result
->getFilePath());
$this
->assertSame('vfs://feeds/test_file_2.txt', $this->fetcher
->fetch($this->feed, $this->state)
->getFilePath());
$this
->assertSame('vfs://feeds/subdir/test_file_4.txt', $this->fetcher
->fetch($this->feed, $this->state)
->getFilePath());
}