public function ModuleHandlerTest::testModuleExists in Drupal 8
Test module exists returns correct module status.
@covers ::moduleExists
File
- core/
tests/ Drupal/ Tests/ Core/ Extension/ ModuleHandlerTest.php, line 249
Class
- ModuleHandlerTest
- @coversDefaultClass \Drupal\Core\Extension\ModuleHandler @runTestsInSeparateProcesses
Namespace
Drupal\Tests\Core\ExtensionCode
public function testModuleExists() {
$module_handler = $this
->getModuleHandler();
$this
->assertTrue($module_handler
->moduleExists('module_handler_test'));
$this
->assertFalse($module_handler
->moduleExists('module_handler_test_added'));
}