Asserts that a file exists in the database.
function assertFileEntryExists($file, $message = NULL) {
$this->container
->get('plugin.manager.entity')
->getStorageController('file')
->resetCache();
$db_file = file_load($file->fid);
$message = isset($message) ? $message : t('File %file exists in database at the correct path.', array(
'%file' => $file->uri,
));
$this
->assertEqual($db_file->uri, $file->uri, $message);
}