function _file_test_get_return in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/file/tests/file_test/file_test.module \_file_test_get_return()
Load the appropriate return value.
Parameters
string $op: One of the hook_file_[validate,download] operations.
Return value
mixed Value set by file_test_set_return().
See also
2 calls to _file_test_get_return()
- file_test_file_download in core/
modules/ file/ tests/ file_test/ file_test.module - Implements hook_file_download().
- file_test_file_validate in core/
modules/ file/ tests/ file_test/ file_test.module - Implements hook_file_validate().
File
- core/
modules/ file/ tests/ file_test/ file_test.module, line 107 - Helper module for the file tests.
Code
function _file_test_get_return($op) {
$return = \Drupal::state()
->get('file_test.return') ?: array(
$op => NULL,
);
return $return[$op];
}