file_test_set_return

Versions
7
file_test_set_return($op, $value)

Assign a return value for a given operation.

See also

_file_test_get_return() and file_test_reset()

Parameters

$op One of the hook_file_[validate,download,references] operations.

$value Value for the hook to return.

Code

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

<?php
function file_test_set_return($op, $value) {
  $return = variable_get('file_test_return', array());
  $return[$op] = $value;
  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.