public function ModuleHandlerDeprecatedHookTest::testInvokeDeprecated in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookTest.php \Drupal\KernelTests\Core\Extension\ModuleHandlerDeprecatedHookTest::testInvokeDeprecated()
- 10 core/tests/Drupal/KernelTests/Core/Extension/ModuleHandlerDeprecatedHookTest.php \Drupal\KernelTests\Core\Extension\ModuleHandlerDeprecatedHookTest::testInvokeDeprecated()
@covers ::invokeDeprecated @expectedDeprecation The deprecated hook hook_deprecated_hook() is implemented in these functions: deprecation_test_deprecated_hook(). Use something else.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Extension/ ModuleHandlerDeprecatedHookTest.php, line 23
Class
- ModuleHandlerDeprecatedHookTest
- Test whether deprecated hook invocations trigger errors.
Namespace
Drupal\KernelTests\Core\ExtensionCode
public function testInvokeDeprecated() {
/* @var $module_handler \Drupal\Core\Extension\ModuleHandlerInterface */
$module_handler = $this->container
->get('module_handler');
$arg = 'an_arg';
$this
->assertEqual($arg, $module_handler
->invokeDeprecated('Use something else.', 'deprecation_test', 'deprecated_hook', [
$arg,
]));
}