function FileUnmanagedDeleteTest::testNormal

Delete a normal file.

File

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

Class

FileUnmanagedDeleteTest
Deletion related tests.

Code

function testNormal() {

  // Create a file for testing
  $file = $this
    ->createFile();

  // Delete a regular file
  $this
    ->assertTrue(file_unmanaged_delete($file->uri), 'Deleted worked.');
  $this
    ->assertFalse(file_exists($file->uri), 'Test file has actually been deleted.');
}