// Generate ASCII text test files.
$lines =
[16, 256, 1024, 2048, 20480
];
$count = 0;
foreach ($lines as $line) { $this->
generateFile('text-' .
$count++, 64,
$line, 'text'
);
} // Copy other test files from fixtures.
$original = \Drupal::
root() . '/core/tests/fixtures/files';
$files =
$file_system->
scanDirectory($original, '/(html|image|javascript|php|sql)-.*/'
);
foreach ($files as $file) { $file_system->
copy($file->uri, PublicStream::
basePath());
} $this->generatedTestFiles = TRUE;
} $files =
[];
// Make sure type is valid.
if (in_array($type,
['binary', 'html', 'image', 'javascript', 'php', 'sql', 'text'
])) { $files =
$file_system->
scanDirectory('public://', '/' .
$type . '\-.*/'
);