You are here

function FileUnmanagedDeleteTest::testDirectory in SimpleTest 7

Try deleting a directory.

File

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

Class

FileUnmanagedDeleteTest
Deletion related tests.

Code

function testDirectory() {

  // A directory to operate on.
  $directory = $this
    ->createDirectory();

  // Try to delete a directory
  $this
    ->assertFalse(file_unmanaged_delete($directory), t('Could not delete the delete directory.'));
  $this
    ->assertTrue(file_exists($directory), t('Directory has not been deleted.'));
}