function FileUnmanagedDeleteRecursiveTest::testEmptyDirectory
7.x file.test | FileUnmanagedDeleteRecursiveTest::testEmptyDirectory() |
Try deleting an empty directory.
File
- drupal-7.x/
modules/ simpletest/ tests/ file.test, line 1275 - 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), 'Function reported success.');
$this->assertFalse(file_exists($directory), 'Directory has been deleted.');
}