1 file.test FileUnmanagedDeleteTest::testDirectory()

Try deleting a directory.

File

core/modules/simpletest/tests/file.test, line 1436
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), 'Could not delete the delete directory.');
  $this->assertTrue(file_exists($directory), 'Directory has not been deleted.');
}