public function FileMoveTest::testMissing in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/File/FileMoveTest.php \Drupal\KernelTests\Core\File\FileMoveTest::testMissing()
 - 9 core/tests/Drupal/KernelTests/Core/File/FileMoveTest.php \Drupal\KernelTests\Core\File\FileMoveTest::testMissing()
 
Try to move a missing file.
File
- core/
tests/ Drupal/ KernelTests/ Core/ File/ FileMoveTest.php, line 54  
Class
- FileMoveTest
 - Tests the unmanaged file move function.
 
Namespace
Drupal\KernelTests\Core\FileCode
public function testMissing() {
  // Move non-existent file.
  $this
    ->expectException(FileNotExistsException::class);
  \Drupal::service('file_system')
    ->move($this
    ->randomMachineName(), $this
    ->randomMachineName());
}