/**
* Tests loading all modules.
*
* @covers ::loadAll
*/
public function testLoadAllModules() { $module_handler =
$this->
getModuleHandler();
$module_handler->
addModule('module_handler_test_all1', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all1'
);
$module_handler->
addModule('module_handler_test_all2', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test_all2'
);
$this->
assertFalse(function_exists('module_handler_test_all1_hook'
), 'Function does not exist before being loaded.'
);
$this->
assertFalse(function_exists('module_handler_test_all2_hook'
), 'Function does not exist before being loaded.'
);
$module_handler->
loadAll();
$this->
assertTrue(function_exists('module_handler_test_all1_hook'
), 'Function exists after being loaded.'
);
$this->
assertTrue(function_exists('module_handler_test_all2_hook'
), 'Function exists after being loaded.'
);
} /**
* Tests reload method.
*
* @covers ::reload
*/
public function testModuleReloading() { $module_handler =
$this->
getMockBuilder(ModuleHandler::
class)