public function ModuleHandlerTest::testLoadAllIncludes in Drupal 8
@covers ::loadAllIncludes
File
- core/
tests/ Drupal/ Tests/ Core/ Extension/ ModuleHandlerTest.php, line 258
Class
- ModuleHandlerTest
- @coversDefaultClass \Drupal\Core\Extension\ModuleHandler @runTestsInSeparateProcesses
Namespace
Drupal\Tests\Core\ExtensionCode
public function testLoadAllIncludes() {
$this
->assertTrue(TRUE);
$module_handler = $this
->getMockBuilder(ModuleHandler::class)
->setConstructorArgs([
$this->root,
[
'module_handler_test' => [
'type' => 'module',
'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml',
'filename' => 'module_handler_test.module',
],
],
$this->cacheBackend,
])
->setMethods([
'loadInclude',
])
->getMock();
// Ensure we reset implementations when settings a new modules list.
$module_handler
->expects($this
->once())
->method('loadInclude');
$module_handler
->loadAllIncludes('hook');
}