function FileFieldTestBase::assertFileNotExists
Asserts that a file does not exist on disk.
File
-
core/
modules/ file/ src/ Tests/ FileFieldTestBase.php, line 290
Class
- FileFieldTestBase
- Provides methods specifically for testing File module's field handling.
Namespace
Drupal\file\TestsCode
public function assertFileNotExists($file, $message = NULL) {
$message = isset($message) ? $message : new FormattableMarkup('File %file exists on the disk.', [
'%file' => $file->getFileUri(),
]);
$this->assertFalse(is_file($file->getFileUri()), $message);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.