function FileUnmanagedDeleteRecursiveTest::testEmptyDirectory
Try deleting an empty directory.
File
-
modules/
simpletest/ tests/ file.test, line 1490
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), 'Function reported success.');
$this->assertFalse(file_exists($directory), 'Directory has been deleted.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.