You are here

protected function ModuleHandlerTest::setUp in Zircon Profile 8

Same name in this branch
  1. 8 core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php \Drupal\Tests\Core\Extension\ModuleHandlerTest::setUp()
  2. 8 core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php \Drupal\Tests\system\Kernel\Extension\ModuleHandlerTest::setUp()
Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php \Drupal\Tests\Core\Extension\ModuleHandlerTest::setUp()

@covers ::__construct

Overrides UnitTestCase::setUp

File

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

Class

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

Namespace

Drupal\Tests\Core\Extension

Code

protected function setUp() {
  parent::setUp();
  $this->cacheBackend = $this
    ->getMock('Drupal\\Core\\Cache\\CacheBackendInterface');
  $this->moduleHandler = new ModuleHandler($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);
}