function file_test_reset in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/file/tests/file_test/file_test.module \file_test_reset()
Reset/initialize the history of calls to the file_* hooks.
See also
13 calls to file_test_reset()
- DeleteTest::testInUse in core/
modules/ file/ src/ Tests/ DeleteTest.php - Tries deleting a file that is in use.
- DownloadTest::setUp in core/
modules/ file/ src/ Tests/ DownloadTest.php - Sets up a Drupal site for running functional and integration tests.
- FileManagedTestBase::setUp in core/
modules/ file/ src/ Tests/ FileManagedTestBase.php - Sets up a Drupal site for running functional and integration tests.
- FileManagedUnitTestBase::setUp in core/
modules/ file/ src/ Tests/ FileManagedUnitTestBase.php - Performs setup tasks before each individual test method is run.
- LoadTest::testMultiple in core/
modules/ file/ src/ Tests/ LoadTest.php - This will test loading file data from the database.
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 = 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);
}