function HookOrderTest::testHookReorderProcedural

Test procedural hook ordering using, 'test_procedural_reorder'.

The order of 'test_procedural_reorder', without modification would be as follows.

That order is modified using the Remove and Reorder as follows and the resulting order asserted in this test.

See also

\bbb_hook_order_test_test_procedural_reorder()

\ccc_hook_order_test_test_procedural_reorder()

\Drupal\aaa_hook_order_test\Hook\AHooks::testProceduralReorder()

File

core/tests/Drupal/KernelTests/Core/Hook/HookOrderTest.php, line 294

Class

HookOrderTest
Tests Hook Order.

Namespace

Drupal\KernelTests\Core\Hook

Code

public function testHookReorderProcedural() : void {
  $this->assertSameCallList([
    'bbb_hook_order_test_test_procedural_reorder',
    AHooks::class . '::testProceduralReorder',
  ], \Drupal::moduleHandler()->invokeAll('test_procedural_reorder'));
}

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