You are here

function file_test_reset in SimpleTest 7

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

See also

the getter/setter functions file_test_get_calls() and file_test_reset().

6 calls to file_test_reset()
FileHookTestCase::setUp in tests/file.test
Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
FileLoadTest::testMultiple in tests/file.test
This will test loading file data from the database.
FileSaveTest::testFileSave in tests/file.test
FileSaveUploadTest::setUp in tests/file.test
Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
FileSaveUploadTest::testNormal in tests/file.test
Test the file_save_upload() function.

... See full list

File

tests/file_test.module, line 103
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(),
    'references' => 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,
    'references' => NULL,
  );
  variable_set('file_test_return', $return);
}