public function RegistryTest::testThemeRegistryAlterByTheme in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/src/Tests/Theme/RegistryTest.php \Drupal\system\Tests\Theme\RegistryTest::testThemeRegistryAlterByTheme()
Tests that the theme registry can be altered by themes.
File
- core/
modules/ system/ src/ Tests/ Theme/ RegistryTest.php, line 153 - Contains \Drupal\system\Tests\Theme\RegistryTest.
Class
- RegistryTest
- Tests the behavior of the ThemeRegistry class.
Namespace
Drupal\system\Tests\ThemeCode
public function testThemeRegistryAlterByTheme() {
/** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */
$theme_handler = \Drupal::service('theme_handler');
$theme_handler
->install([
'test_theme',
]);
$theme_handler
->setDefault('test_theme');
$registry = new Registry(\Drupal::root(), \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_theme');
$registry
->setThemeManager(\Drupal::theme());
$this
->assertEqual('value', $registry
->get()['theme_test_template_test']['variables']['additional']);
}