class HookLoaderTest

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Hook/HookLoaderTest.php \Drupal\KernelTests\Core\Hook\HookLoaderTest

Test hook loading.

Attributes

#[Group('Hook')] #[RunTestsInSeparateProcesses]

Hierarchy

Expanded class hierarchy of HookLoaderTest

File

core/tests/Drupal/KernelTests/Core/Hook/HookLoaderTest.php, line 15

Namespace

Drupal\KernelTests\Core\Hook
View source
class HookLoaderTest extends KernelTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'hook_loader_test',
  ];
  use HookOrderTestTrait;
  
  /**
   * Test hook implementation order.
   */
  public function testHookOrder() : void {
    $this->assertSameCallList([
      CircularDependencyHooks::class . '::testHook',
    ], \Drupal::moduleHandler()->invokeAll('test_hook'));
  }

}

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