public function ExtensionPathResolverTest::testExtensionPathResolvingWithNonExistingModule in Drupal 9
Same name and namespace in other branches
- 10 core/tests/Drupal/KernelTests/Core/Bootstrap/ExtensionPathResolverTest.php \Drupal\KernelTests\Core\Bootstrap\ExtensionPathResolverTest::testExtensionPathResolvingWithNonExistingModule()
@covers ::getPathname
File
- core/
tests/ Drupal/ KernelTests/ Core/ Bootstrap/ ExtensionPathResolverTest.php, line 51
Class
- ExtensionPathResolverTest
- Tests that extension path resolver works correctly.
Namespace
Drupal\KernelTests\Core\BootstrapCode
public function testExtensionPathResolvingWithNonExistingModule() : void {
$this
->expectException(UnknownExtensionException::class);
$this
->expectExceptionMessage('The module there_is_a_module_for_that does not exist.');
$this
->assertNull(\Drupal::service('extension.list.module')
->getPathname('there_is_a_module_for_that'), 'Searching for an item that does not exist returns NULL.');
}