You are here

public function ModuleHandlerTest::testGetModuleWithNonExistingModule in Drupal 8

@covers ::getModule

File

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

Class

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

Namespace

Drupal\Tests\Core\Extension

Code

public function testGetModuleWithNonExistingModule() {
  $this
    ->expectException(UnknownExtensionException::class);
  $this
    ->getModuleHandler()
    ->getModule('claire_alice_watch_my_little_pony_module_that_does_not_exist');
}