function file_test_reset
Same name in other branches
- 9 core/modules/file/tests/file_test/file_test.module \file_test_reset()
- 8.9.x core/modules/file/tests/file_test/file_test.module \file_test_reset()
- 10 core/modules/file/tests/file_test/file_test.module \file_test_reset()
- 11.x core/modules/file/tests/file_test/file_test.module \file_test_reset()
Reset/initialize the history of calls to the file_* hooks.
See also
12 calls to file_test_reset()
- FileDeleteTest::testInUse in modules/
simpletest/ tests/ file.test - Tries deleting a file that is in use.
- FileDownloadTest::setUp in modules/
simpletest/ tests/ file.test - Sets up a Drupal site for running functional and integration tests.
- FileHookTestCase::setUp in modules/
simpletest/ tests/ file.test - Sets up a Drupal site for running functional and integration tests.
- FileLoadTest::testMultiple in modules/
simpletest/ tests/ file.test - This will test loading file data from the database.
- FileSaveTest::testFileSave in modules/
simpletest/ tests/ file.test
File
-
modules/
simpletest/ tests/ file_test.module, line 152
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(),
);
variable_set('file_test_results', $results);
// These hooks will return these values, see file_test_set_return().
$return = array(
'validate' => array(),
'download' => NULL,
);
variable_set('file_test_return', $return);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.