You are here

public function ModuleHandlerTest::testGetModuleDirectories in Drupal 8

@covers ::getModuleDirectories

File

core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php, line 502

Class

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

Namespace

Drupal\Tests\Core\Extension

Code

public function testGetModuleDirectories() {
  $module_handler = $this
    ->getModuleHandler();
  $module_handler
    ->setModuleList([]);
  $module_handler
    ->addModule('node', 'core/modules/node');
  $this
    ->assertEquals([
    'node' => $this->root . '/core/modules/node',
  ], $module_handler
    ->getModuleDirectories());
}