function ExtensionPathResolverTest::testUnknownExtension
Same name in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Bootstrap/ExtensionPathResolverTest.php \Drupal\KernelTests\Core\Bootstrap\ExtensionPathResolverTest::testUnknownExtension()
Tests the getPath() method with an unknown extension.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Bootstrap/ ExtensionPathResolverTest.php, line 99
Class
- ExtensionPathResolverTest
- Tests that extension path resolver works correctly.
Namespace
Drupal\KernelTests\Core\BootstrapCode
public function testUnknownExtension() : void {
$module_extension_list = $this->prophesize(ModuleExtensionList::class);
$profile_extension_list = $this->prophesize(ProfileExtensionList::class);
$theme_extension_list = $this->prophesize(ThemeExtensionList::class);
$theme_engine_extension_list = $this->prophesize(ThemeEngineExtensionList::class);
$resolver = new ExtensionPathResolver($module_extension_list->reveal(), $profile_extension_list->reveal(), $theme_extension_list->reveal(), $theme_engine_extension_list->reveal());
$this->expectException(UnknownExtensionTypeException::class);
$this->expectExceptionMessage('Extension type foo is unknown.');
$resolver->getPath('foo', 'bar');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.