You are here

function FileUnmanagedDeleteTest::testNormal in SimpleTest 7

Delete a normal file.

File

tests/file.test, line 953
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), t('Deleted worked.'));
  $this
    ->assertFalse(file_exists($file->uri), t('Test file has actually been deleted.'));
}