function ExtensionPathResolverTest::testExtensionPathResolvingWithNonExistingThemeEngine

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Bootstrap/ExtensionPathResolverTest.php \Drupal\KernelTests\Core\Bootstrap\ExtensionPathResolverTest::testExtensionPathResolvingWithNonExistingThemeEngine()
  2. 10 core/tests/Drupal/KernelTests/Core/Bootstrap/ExtensionPathResolverTest.php \Drupal\KernelTests\Core\Bootstrap\ExtensionPathResolverTest::testExtensionPathResolvingWithNonExistingThemeEngine()

@covers ::getPathname

File

core/tests/Drupal/KernelTests/Core/Bootstrap/ExtensionPathResolverTest.php, line 89

Class

ExtensionPathResolverTest
Tests that extension path resolver works correctly.

Namespace

Drupal\KernelTests\Core\Bootstrap

Code

public function testExtensionPathResolvingWithNonExistingThemeEngine() : void {
    $this->expectException(UnknownExtensionException::class);
    $this->expectExceptionMessage('The theme_engine there_is_an_theme_engine_for_you does not exist');
    $this->assertNull(\Drupal::service('extension.list.theme_engine')->getPathname('there_is_an_theme_engine_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.