1.20.x file.test | FileTestHelper::assertFileExists($file, $message = NULL) |
Asserts that a file exists physically on disk.
File
- modules/
file/ tests/ file.test, line 294 - Tests for file.module.
Class
- FileTestHelper
- Provides methods specifically for testing File module's field handling.
Code
function assertFileExists($file, $message = NULL) {
$message = isset($message) ? $message : format_string('File %file exists on the disk.', array('%file' => $file->uri));
$this->assertTrue(is_file($file->uri), $message);
}