You are here

public function ModuleHandlerTest::testLoadAllIncludes in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php \Drupal\Tests\Core\Extension\ModuleHandlerTest::testLoadAllIncludes()

@covers ::loadAllIncludes

File

core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php, line 245
Contains \Drupal\Tests\Core\Extension\ModuleHandlerTest.

Class

ModuleHandlerTest
@coversDefaultClass \Drupal\Core\Extension\ModuleHandler @group Extension

Namespace

Drupal\Tests\Core\Extension

Code

public function testLoadAllIncludes() {
  $this
    ->assertTrue(true);
  $module_handler = $this
    ->getMockBuilder('Drupal\\Core\\Extension\\ModuleHandler')
    ->setConstructorArgs(array(
    $this->root,
    array(
      'module_handler_test' => array(
        '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(array(
    'loadInclude',
  ))
    ->getMock();

  // Ensure we reset implementations when settings a new modules list.
  $module_handler
    ->expects($this
    ->once())
    ->method('loadInclude');
  $module_handler
    ->loadAllIncludes('hook');
}