function RegistryTest::testLegacyThemeGetRegistry
Tests deprecated theme_get_registry function.
@group legacy
See also
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Theme/ RegistryTest.php, line 300
Class
- RegistryTest
- Tests the behavior of the ThemeRegistry class.
Namespace
Drupal\KernelTests\Core\ThemeCode
public function testLegacyThemeGetRegistry() : void {
$registry = \Drupal::service('theme.registry');
$this->expectDeprecation('theme_get_registry() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use theme.registry service method get() instead. See https://www.drupal.org/node/3348850');
$this->assertEquals($registry->get(), theme_get_registry());
$this->expectDeprecation('theme_get_registry() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use theme.registry service method getRuntime() instead. See https://www.drupal.org/node/3348850');
$this->assertEquals($registry->getRuntime(), theme_get_registry(FALSE));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.