You are here

public function ModuleHandlerTest::testModuleExists in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php \Drupal\Tests\Core\Extension\ModuleHandlerTest::testModuleExists()

Test module exists returns correct module status.

@covers ::moduleExists

File

core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php, line 237
Contains \Drupal\Tests\Core\Extension\ModuleHandlerTest.

Class

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

Namespace

Drupal\Tests\Core\Extension

Code

public function testModuleExists() {
  $this
    ->assertTrue($this->moduleHandler
    ->moduleExists('module_handler_test'));
  $this
    ->assertFalse($this->moduleHandler
    ->moduleExists('module_handler_test_added'));
}