function FileTestHelper::getCalls
Gets the arguments passed to a given hook invocation.
Arguments are gathered since Drupal\file_test\FileTestHelper::reset() was last called.
Parameters
string $op: One of the hook_file_* operations: 'load', 'validate', 'download', 'insert', 'update', 'copy', 'move', 'delete'.
Return value
array Array of the parameters passed to each call.
See also
Drupal\file_test\FileTestHelper::logCall()
Drupal\file_test\FileTestHelper::reset()
3 calls to FileTestHelper::getCalls()
- FileManagedTestBase::assertFileHookCalled in core/
modules/ file/ tests/ src/ Functional/ FileManagedTestBase.php - Assert that a hook_file_* hook was called a certain number of times.
- FileManagedUnitTestBase::assertFileHookCalled in core/
modules/ file/ tests/ src/ Kernel/ FileManagedUnitTestBase.php - Assert that a hook_file_* hook was called a certain number of times.
- FileValidatorTest::testValidate in core/
modules/ file/ tests/ src/ Kernel/ Validation/ FileValidatorTest.php - Tests the validator.
File
-
core/
modules/ file/ tests/ file_test/ src/ FileTestHelper.php, line 58
Class
- FileTestHelper
- Helper for file tests.
Namespace
Drupal\file_testCode
public static function getCalls($op) : array {
$results = \Drupal::state()->get('file_test.results', []);
return $results[$op];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.