function file_test_reset in Drupal 8
Same name and namespace in other branches
- 7 modules/simpletest/tests/file_test.module \file_test_reset()
- 9 core/modules/file/tests/file_test/file_test.module \file_test_reset()
Reset/initialize the history of calls to the file_* hooks.
See also
21 calls to file_test_reset()
- DeleteTest::testInUse in core/
modules/ file/ tests/ src/ Kernel/ DeleteTest.php - Tries deleting a file that is in use.
- DownloadTest::doPrivateFileTransferTest in core/
modules/ file/ tests/ src/ Functional/ DownloadTest.php - Test the private file transfer system.
- DownloadTest::setUp in core/
modules/ file/ tests/ src/ Functional/ DownloadTest.php - FileManagedTestBase::setUp in core/
modules/ file/ src/ Tests/ FileManagedTestBase.php - Sets up a Drupal site for running functional and integration tests.
- FileManagedTestBase::setUp in core/
modules/ file/ tests/ src/ Functional/ FileManagedTestBase.php
File
- core/
modules/ file/ tests/ file_test/ file_test.module, line 22 - Helper module for the file tests.
Code
function file_test_reset() {
// Keep track of calls to these hooks
$results = [
'load' => [],
'validate' => [],
'download' => [],
'insert' => [],
'update' => [],
'copy' => [],
'move' => [],
'delete' => [],
];
\Drupal::state()
->set('file_test.results', $results);
// These hooks will return these values, see file_test_set_return().
$return = [
'validate' => [],
'download' => NULL,
];
\Drupal::state()
->set('file_test.return', $return);
}