function ThemeDeprecationTest::testThemeExtensionDeprecation
Same name and namespace in other branches
- main core/modules/system/tests/src/Kernel/Theme/ThemeDeprecationTest.php \Drupal\Tests\system\Kernel\Theme\ThemeDeprecationTest::testThemeExtensionDeprecation()
Tests that .theme deprecations are emitted.
Attributes
#[IgnoreDeprecations]
File
-
core/
modules/ system/ tests/ src/ Kernel/ Theme/ ThemeDeprecationTest.php, line 70
Class
- ThemeDeprecationTest
- Tests theme deprecations.
Namespace
Drupal\Tests\system\Kernel\ThemeCode
public function testThemeExtensionDeprecation() : void {
\Drupal::service('theme_installer')->install([
'test_theme_discovery_deprecation',
]);
\Drupal::theme()->setActiveTheme(\Drupal::service(ThemeInitializationInterface::class)->initTheme('test_theme_discovery_deprecation'));
$this->expectUserDeprecationMessage('Using test_theme_discovery_deprecation.theme is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. Use classes instead. See https://www.drupal.org/node/3581222');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.