You are here

public function FileSyncTest::testExportFile in Tome 8

@covers \Drupal\tome_sync\FileSync::exportFile

File

modules/tome_sync/tests/src/Kernel/FileSyncTest.php, line 78

Class

FileSyncTest
Tests that the file sync works.

Namespace

Drupal\Tests\tome_sync\Kernel

Code

public function testExportFile() {
  touch('public://example.txt');
  $file = File::create([
    'uri' => 'public://example.txt',
  ]);
  $file
    ->save();
  $this
    ->assertTrue(file_exists(Settings::get('tome_files_directory') . '/public/example.txt'));
}