Reset/initialize the history of calls to the file_* hooks.
function file_test_reset() {
// Keep track of calls to these hooks
$results = array(
'load' => array(),
'validate' => array(),
'download' => array(),
'insert' => array(),
'update' => array(),
'copy' => array(),
'move' => array(),
'delete' => array(),
);
Drupal::state()
->set('file_test.results', $results);
// These hooks will return these values, see file_test_set_return().
$return = array(
'validate' => array(),
'download' => NULL,
);
Drupal::state()
->set('file_test.return', $return);
}