You are here

function file_test_get_all_calls in Drupal 8

Same name and namespace in other branches
  1. 7 modules/simpletest/tests/file_test.module \file_test_get_all_calls()
  2. 9 core/modules/file/tests/file_test/file_test.module \file_test_get_all_calls()
  3. 10 core/modules/file/tests/file_test/file_test.module \file_test_get_all_calls()

Get an array with the calls for all hooks.

Return value

An array keyed by hook name ('load', 'validate', 'download', 'insert', 'update', 'copy', 'move', 'delete') with values being arrays of parameters passed to each call.

3 calls to file_test_get_all_calls()
FileManagedTestBase::assertFileHooksCalled in core/modules/file/src/Tests/FileManagedTestBase.php
Assert that all of the specified hook_file_* hooks were called once, other values result in failure.
FileManagedTestBase::assertFileHooksCalled in core/modules/file/tests/src/Functional/FileManagedTestBase.php
Assert that all of the specified hook_file_* hooks were called once, other values result in failure.
FileManagedUnitTestBase::assertFileHooksCalled in core/modules/file/tests/src/Kernel/FileManagedUnitTestBase.php
Assert that all of the specified hook_file_* hooks were called once, other values result in failure.

File

core/modules/file/tests/file_test/file_test.module, line 71
Helper module for the file tests.

Code

function file_test_get_all_calls() {
  return \Drupal::state()
    ->get('file_test.results') ?: [];
}