public function FileSyncTest::testDeleteExportDirectory in Tome 8
@covers \Drupal\tome_sync\FileSync::deleteExportDirectory
File
- modules/
tome_sync/ tests/ src/ Kernel/ FileSyncTest.php, line 56
Class
- FileSyncTest
- Tests that the file sync works.
Namespace
Drupal\Tests\tome_sync\KernelCode
public function testDeleteExportDirectory() {
$directory = Settings::get('tome_files_directory') . '/public';
$this->fileSystem
->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY);
touch($directory . '/example.txt');
\Drupal::service('tome_sync.file_sync')
->deleteExportDirectory();
$this
->assertFalse(file_exists($directory));
}