function FileDeleteTest::testMissing
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/File/FileDeleteTest.php \Drupal\KernelTests\Core\File\FileDeleteTest::testMissing()
- 8.9.x 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 31
Class
- FileDeleteTest
- Tests the unmanaged file delete function.
Namespace
Drupal\KernelTests\Core\FileCode
public function testMissing() : void {
// 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.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.