file_test_reset

Versions
7
file_test_reset()

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

See also

the getter/setter functions file_test_get_calls() and file_test_reset()

Code

modules/simpletest/tests/file_test.module, line 103

<?php
function file_test_reset() {
  // Keep track of calls to these hooks
  $results = array(
    'load' => array(),
    'validate' => array(),
    'download' => array(),
    'references' => array(),
    'insert' => array(),
    'update' => array(),
    'copy' => array(),
    'move' => array(),
    'delete' => array(),
  );
  variable_set('file_test_results', $results);

  // These hooks will return these values, @see file_test_set_return().
  $return = array(
    'validate' => array(),
    'download' => NULL,
    'references' => NULL,
  );
  variable_set('file_test_return', $return);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.