You are here

function UnmanagedDeleteTest::testNormal in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/File/UnmanagedDeleteTest.php \Drupal\system\Tests\File\UnmanagedDeleteTest::testNormal()

Delete a normal file.

File

core/modules/system/src/Tests/File/UnmanagedDeleteTest.php, line 19
Contains \Drupal\system\Tests\File\UnmanagedDeleteTest.

Class

UnmanagedDeleteTest
Tests the unmanaged file delete function.

Namespace

Drupal\system\Tests\File

Code

function testNormal() {

  // Create a file for testing
  $uri = $this
    ->createUri();

  // Delete a regular file
  $this
    ->assertTrue(file_unmanaged_delete($uri), 'Deleted worked.');
  $this
    ->assertFalse(file_exists($uri), 'Test file has actually been deleted.');
}