function FileTestHelper::reset
Reset/initialize the history of calls to the file_* hooks.
See also
Drupal\file_test\FileTestHelper::getCalls()
Drupal\file_test\FileTestHelper::reset()
21 calls to FileTestHelper::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 - Tests the private file transfer system.
- DownloadTest::setUp in core/
modules/ file/ tests/ src/ Functional/ DownloadTest.php - FileManagedTestBase::setUp in core/
modules/ file/ tests/ src/ Functional/ FileManagedTestBase.php - FileManagedUnitTestBase::setUp in core/
modules/ file/ tests/ src/ Kernel/ FileManagedUnitTestBase.php
File
-
core/
modules/ file/ tests/ file_test/ src/ FileTestHelper.php, line 21
Class
- FileTestHelper
- Helper for file tests.
Namespace
Drupal\file_testCode
public static function reset() : void {
// 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 FileTestHelper::setReturn().
$return = [
'validate' => [],
'download' => NULL,
];
\Drupal::state()->set('file_test.return', $return);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.