$this->
assertNull($module_handler->
invoke('module_handler_test_fake', 'hook',
[FALSE
]), 'Installed module runs hook.'
);
} /**
* Tests implementations methods when module is enabled.
*
* @covers ::hasImplementations
* @covers ::loadAllIncludes
*/
public function testImplementsHookModuleEnabled() { $module_handler =
$this->
getModuleHandler();
$this->
assertTrue($module_handler->
hasImplementations('hook', 'module_handler_test'
), 'Installed module implementation found.'
);
$module_handler->
addModule('module_handler_test_added', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_added'
);
$this->
assertTrue($module_handler->
hasImplementations('hook', 'module_handler_test_added'
), 'Runtime added module with implementation in include found.'
);
$module_handler->
addModule('module_handler_test_no_hook', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_no_hook'
);
$this->
assertFalse($module_handler->
hasImplementations('hook', 'module_handler_test_no_hook'
), 'Missing implementation not found.'
);
} /**
* Tests hasImplementations.
*
* @covers ::hasImplementations
*/