function FileUnmanagedDeleteTest::testMissing

7.x file.test FileUnmanagedDeleteTest::testMissing()

Try deleting a missing file.

File

drupal-7.x/modules/simpletest/tests/file.test, line 1213
This provides SimpleTests for the core file handling functionality. These include FileValidateTest and FileSaveTest.

Class

FileUnmanagedDeleteTest
Deletion related tests.

Code

function testMissing() {
  // Try to delete a non-existing file
  $this->assertTrue(file_unmanaged_delete(file_default_scheme() . '/' . $this->randomName()), 'Returns true when deleting a non-existent file.');
}