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