function file_test_set_return
Same name in other branches
- 9 core/modules/file/tests/file_test/file_test.module \file_test_set_return()
- 8.9.x core/modules/file/tests/file_test/file_test.module \file_test_set_return()
- 10 core/modules/file/tests/file_test/file_test.module \file_test_set_return()
- 11.x core/modules/file/tests/file_test/file_test.module \file_test_set_return()
Assign a return value for a given operation.
Parameters
$op: One of the hook_file_[validate,download] operations.
$value: Value for the hook to return.
See also
3 calls to file_test_set_return()
- FileDownloadTest::checkUrl in modules/
simpletest/ tests/ file.test - Download a file from the URL generated by file_create_url().
- FileDownloadTest::testPrivateFileTransfer in modules/
simpletest/ tests/ file.test - Test the private file transfer system.
- FileValidateTest::testCallerValidation in modules/
simpletest/ tests/ file.test - Test that the validators passed into are checked.
File
-
modules/
simpletest/ tests/ file_test.module, line 251
Code
function file_test_set_return($op, $value) {
$return = variable_get('file_test_return', array());
$return[$op] = $value;
variable_set('file_test_return', $return);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.