function file_test_reset

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

See also

file_test_get_calls()

file_test_reset()

11 calls to file_test_reset()
DeleteTest::testInUse in drupal/core/modules/file/lib/Drupal/file/Tests/DeleteTest.php
Tries deleting a file that is in use.
DownloadTest::setUp in drupal/core/modules/file/lib/Drupal/file/Tests/DownloadTest.php
Sets up a Drupal site for running functional and integration tests.
FileManagedTestBase::setUp in drupal/core/modules/file/lib/Drupal/file/Tests/FileManagedTestBase.php
Sets up a Drupal site for running functional and integration tests.
LoadTest::testMultiple in drupal/core/modules/file/lib/Drupal/file/Tests/LoadTest.php
This will test loading file data from the database.
SaveTest::testFileSave in drupal/core/modules/file/lib/Drupal/file/Tests/SaveTest.php

... See full list

File

drupal/core/modules/file/tests/file_test/file_test.module, line 45
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(),
  );
  Drupal::state()
    ->set('file_test.results', $results);

  // These hooks will return these values, see file_test_set_return().
  $return = array(
    'validate' => array(),
    'download' => NULL,
  );
  Drupal::state()
    ->set('file_test.return', $return);
}