function EntityKernelTestBase::getHooksInfo

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php \Drupal\KernelTests\Core\Entity\EntityKernelTestBase::getHooksInfo()

Returns the entity_test hook invocation info.

Return value

array An associative array of arbitrary hook data keyed by hook name.

File

core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php, line 139

Class

EntityKernelTestBase
Defines an abstract test base for entity kernel tests.

Namespace

Drupal\KernelTests\Core\Entity

Code

protected function getHooksInfo() {
  $key = 'entity_test.hooks';
  $hooks = $this->state
    ->get($key);
  $this->state
    ->set($key, []);
  return $hooks;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.