function 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.