You are here

public function ModuleHandlerTest::testGetModuleList in Drupal 8

Confirm we get back the modules set in the constructor.

@covers ::getModuleList

File

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

Class

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

Namespace

Drupal\Tests\Core\Extension

Code

public function testGetModuleList() {
  $this
    ->assertEquals($this
    ->getModuleHandler()
    ->getModuleList(), [
    'module_handler_test' => new Extension($this->root, 'module', 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'module_handler_test.module'),
  ]);
}