function ModuleHandlerTest::testModuleExists
Tests module exists returns correct module status.
@covers ::moduleExists
File
-
core/
tests/ Drupal/ Tests/ Core/ Extension/ ModuleHandlerTest.php, line 252
Class
- ModuleHandlerTest
- @coversDefaultClass \Drupal\Core\Extension\ModuleHandler[[api-linebreak]] @runTestsInSeparateProcesses
Namespace
Drupal\Tests\Core\ExtensionCode
public function testModuleExists() : void {
$module_handler = $this->getModuleHandler();
$this->assertTrue($module_handler->moduleExists('module_handler_test'));
$this->assertFalse($module_handler->moduleExists('module_handler_test_added'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.