public function FileDeleteTest::testMissing in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/File/FileDeleteTest.php \Drupal\KernelTests\Core\File\FileDeleteTest::testMissing()
- 10 core/tests/Drupal/KernelTests/Core/File/FileDeleteTest.php \Drupal\KernelTests\Core\File\FileDeleteTest::testMissing()
Try deleting a missing file.
File
- core/
tests/ Drupal/ KernelTests/ Core/ File/ FileDeleteTest.php, line 29
Class
- FileDeleteTest
- Tests the unmanaged file delete function.
Namespace
Drupal\KernelTests\Core\FileCode
public function testMissing() {
// Try to delete a non-existing file
$this
->assertTrue(\Drupal::service('file_system')
->delete('public://' . $this
->randomMachineName()), 'Returns true when deleting a non-existent file.');
}