You are here

public function ModuleHandlerTest::testIsLoaded in Drupal 8

Test isLoaded accessor.

@covers ::isLoaded

File

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

Class

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

Namespace

Drupal\Tests\Core\Extension

Code

public function testIsLoaded() {
  $module_handler = $this
    ->getModuleHandler();
  $this
    ->assertFalse($module_handler
    ->isLoaded());
  $module_handler
    ->loadAll();
  $this
    ->assertTrue($module_handler
    ->isLoaded());
}