function FileUnmanagedDeleteTest::testNormal

Delete a normal file.

File

modules/simpletest/tests/file.test, line 1407

Class

FileUnmanagedDeleteTest
Deletion related tests.

Code

function testNormal() {
    // Create a file for testing
    $file = $this->createFile();
    // Delete a regular file
    $this->assertTrue(file_unmanaged_delete($file->uri), 'Deleted worked.');
    $this->assertFalse(file_exists($file->uri), 'Test file has actually been deleted.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.