public function LegacyExtensionPathResolverTest::testDeprecatedWarning in Drupal 9
@group legacy
File
- core/
tests/ Drupal/ KernelTests/ Core/ Extension/ LegacyExtensionPathResolverTest.php, line 23
Class
- LegacyExtensionPathResolverTest
- Tests the extension path resolver deprecations.
Namespace
Drupal\KernelTests\Core\ExtensionCode
public function testDeprecatedWarning() {
$this
->expectDeprecation('Calling getPathname() with an invalid $type parameter is deprecated in drupal:9.3.0 and will throw an \\Drupal\\Core\\Extension\\Exception\\UnknownExtensionTypeException in drupal:10.0.0. See https://www.drupal.org/node/2940438');
$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
->assertEmpty($resolver
->getPath('foo', 'bar'));
}