function UnmanagedDeleteTest::testDirectory

Try deleting a directory.

File

drupal/core/modules/system/lib/Drupal/system/Tests/File/UnmanagedDeleteTest.php, line 45
Definition of Drupal\system\Tests\File\UnmanagedDeleteTest.

Class

UnmanagedDeleteTest
Deletion related tests.

Namespace

Drupal\system\Tests\File

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.');
}