1 file_test.module file_test_reset()

Reset/initialize the history of calls to the file_* hooks.

See also

file_test_get_calls()

file_test_reset()

File

core/modules/simpletest/tests/file_test.module, line 151
Helper module for the file tests.

Code

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(),
  );
  state_set('file_test_results', $results);

  // These hooks will return these values, see file_test_set_return().
  $return = array(
    'validate' => array(),
    'download' => NULL,
  );
  state_set('file_test_return', $return);
}