function FileUnmanagedDeleteTest::testDirectory in Drupal 7
Try deleting a directory.
File
- modules/
simpletest/ tests/ file.test, line 1382 - 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.');
}