You are here

function file_test_reset in Drupal 7

Same name and namespace in other branches
  1. 8 core/modules/file/tests/file_test/file_test.module \file_test_reset()
  2. 9 core/modules/file/tests/file_test/file_test.module \file_test_reset()
  3. 10 core/modules/file/tests/file_test/file_test.module \file_test_reset()

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

See also

file_test_get_calls()

file_test_reset()

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

... See full list

File

modules/simpletest/tests/file_test.module, line 152
Helper module for the file tests.

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);
}