function HookAlterOrderTest::assertAlterCallOrder
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Hook/HookAlterOrderTest.php \Drupal\KernelTests\Core\Hook\HookAlterOrderTest::assertAlterCallOrder()
Asserts the call order from an alter call.
Also asserts additional $type argument values that are meant to produce the same result.
Parameters
list<string> $expected: Expected call list, as strings from __METHOD__ or __FUNCTION__.
string|list<string> $type: First argument to pass to ->alter().
4 calls to HookAlterOrderTest::assertAlterCallOrder()
- HookAlterOrderTest::testAlterOrder in core/
tests/ Drupal/ KernelTests/ Core/ Hook/ HookAlterOrderTest.php - Test ordering alter calls.
- HookAlterOrderTest::testProceduralModuleImplementsAlterOrder in core/
tests/ Drupal/ KernelTests/ Core/ Hook/ HookAlterOrderTest.php - Tests procedural implementations of module implements alter ordering.
- HookAlterOrderTest::testReorderAlterMissingTarget in core/
tests/ Drupal/ KernelTests/ Core/ Hook/ HookAlterOrderTest.php - Tests #[ReorderHook] attributes with missing target.
- HookAlterOrderTest::testReorderCrossHookAlter in core/
tests/ Drupal/ KernelTests/ Core/ Hook/ HookAlterOrderTest.php - Tests #[ReorderHook] targeting other hooks.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Hook/ HookAlterOrderTest.php, line 413
Class
- HookAlterOrderTest
- Tests Hook Alter Order.
Namespace
Drupal\KernelTests\Core\HookCode
protected function assertAlterCallOrder(array $expected, string|array $type) : void {
$this->assertSameCallList($expected, $this->alter($type));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.