function ModuleHandlerDeprecatedHookTest::testInvokeAllDeprecated
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookTest.php \Drupal\KernelTests\Core\Extension\ModuleHandlerDeprecatedHookTest::testInvokeAllDeprecated()
- 8.9.x core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookTest.php \Drupal\KernelTests\Core\Extension\ModuleHandlerDeprecatedHookTest::testInvokeAllDeprecated()
- 10 core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookTest.php \Drupal\KernelTests\Core\Extension\ModuleHandlerDeprecatedHookTest::testInvokeAllDeprecated()
@covers ::invokeAllDeprecated
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Extension/ ModuleHandlerDeprecatedHookTest.php, line 44
Class
- ModuleHandlerDeprecatedHookTest
- Test whether deprecated hook invocations trigger errors.
Namespace
Drupal\KernelTests\Core\ExtensionCode
public function testInvokeAllDeprecated() : void {
$this->expectDeprecation('The deprecated hook hook_deprecated_hook() is implemented in these modules: deprecation_test, deprecation_hook_attribute_test. Use something else.');
/** @var \Drupal\Core\Extension\ModuleHandlerInterface $module_handler */
$module_handler = $this->container
->get('module_handler');
$arg = 'an_arg';
$this->assertEquals([
$arg,
$arg,
], $module_handler->invokeAllDeprecated('Use something else.', 'deprecated_hook', [
$arg,
]));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.