function ModuleHandlerTest::testGetModuleWithNonExistingModule

Tests get module with non existing module.

@legacy-covers ::getModule

File

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

Class

ModuleHandlerTest
Tests Drupal\Core\Extension\ModuleHandler.

Namespace

Drupal\Tests\Core\Extension

Code

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

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