function ModuleHandlerTest::testIsLoaded

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php \Drupal\Tests\Core\Extension\ModuleHandlerTest::testIsLoaded()
  2. 10 core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php \Drupal\Tests\Core\Extension\ModuleHandlerTest::testIsLoaded()
  3. 9 core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php \Drupal\Tests\Core\Extension\ModuleHandlerTest::testIsLoaded()
  4. 8.9.x core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php \Drupal\Tests\Core\Extension\ModuleHandlerTest::testIsLoaded()

Tests isLoaded accessor.

File

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

Class

ModuleHandlerTest
Tests Drupal\Core\Extension\ModuleHandler.

Namespace

Drupal\Tests\Core\Extension

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.