function ModuleHandlerTest::testImplementsHook
Tests deprecation of the ::implementsHook method.
@covers ::implementsHook
@group legacy
File
-
core/
tests/ Drupal/ Tests/ Core/ Extension/ ModuleHandlerTest.php, line 344
Class
- ModuleHandlerTest
- @coversDefaultClass \Drupal\Core\Extension\ModuleHandler @runTestsInSeparateProcesses
Namespace
Drupal\Tests\Core\ExtensionCode
public function testImplementsHook() {
$this->expectDeprecation('ModuleHandlerInterface::implementsHook() is deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. Instead you should use ModuleHandlerInterface::hasImplementations() with the $modules argument. See https://www.drupal.org/node/3000490');
$this->assertTrue($this->getModuleHandler()
->implementsHook('module_handler_test', 'hook'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.