function EntityKernelTestBase::getHooksInfo

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php \Drupal\KernelTests\Core\Entity\EntityKernelTestBase::getHooksInfo()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php \Drupal\KernelTests\Core\Entity\EntityKernelTestBase::getHooksInfo()
  3. 10 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.

1 call to EntityKernelTestBase::getHooksInfo()
EntityTranslationTest::doTestEntityTranslationAPI in core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php
Executes the Entity Translation API tests for the given entity type.

File

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

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.