function ExtensionPathResolverTest::testExtensionPathResolvingWithNonExistingTheme
Same name in other branches
- 10 core/tests/Drupal/KernelTests/Core/Bootstrap/ExtensionPathResolverTest.php \Drupal\KernelTests\Core\Bootstrap\ExtensionPathResolverTest::testExtensionPathResolvingWithNonExistingTheme()
- 11.x core/tests/Drupal/KernelTests/Core/Bootstrap/ExtensionPathResolverTest.php \Drupal\KernelTests\Core\Bootstrap\ExtensionPathResolverTest::testExtensionPathResolvingWithNonExistingTheme()
@covers ::getPathname
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Bootstrap/ ExtensionPathResolverTest.php, line 61
Class
- ExtensionPathResolverTest
- Tests that extension path resolver works correctly.
Namespace
Drupal\KernelTests\Core\BootstrapCode
public function testExtensionPathResolvingWithNonExistingTheme() : void {
$this->expectException(UnknownExtensionException::class);
$this->expectExceptionMessage('The theme there_is_a_theme_for_you does not exist.');
$this->assertNull(\Drupal::service('extension.list.theme')->getPathname('there_is_a_theme_for_you'), 'Searching for an item that does not exist returns NULL.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.