You are here

function FileUnmanagedDeleteRecursiveTest::testEmptyDirectory in SimpleTest 7

Try deleting an empty directory.

File

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

Class

FileUnmanagedDeleteRecursiveTest
Deletion related tests.

Code

function testEmptyDirectory() {

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

  // Delete the directory.
  $this
    ->assertTrue(file_unmanaged_delete_recursive($directory), t('Function reported success.'));
  $this
    ->assertFalse(file_exists($directory), t('Directory has been deleted.'));
}