X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FKernelTests%2FCore%2FTheme%2FRegistryTest.php;fp=web%2Fcore%2Ftests%2FDrupal%2FKernelTests%2FCore%2FTheme%2FRegistryTest.php;h=320e92f46a1497c1d357328f9c33e12ffd1a6d7a;hp=7f6d2eccda8ededad48d4ebf6ce53ee612359874;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php b/web/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php index 7f6d2eccd..320e92f46 100644 --- a/web/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php +++ b/web/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php @@ -69,11 +69,11 @@ class RegistryTest extends KernelTestBase { $theme_handler = \Drupal::service('theme_handler'); $theme_handler->install(['test_basetheme', 'test_subtheme', 'test_subsubtheme']); - $registry_subsub_theme = new Registry(\Drupal::root(), \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_subsubtheme'); + $registry_subsub_theme = new Registry($this->root, \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_subsubtheme'); $registry_subsub_theme->setThemeManager(\Drupal::theme()); - $registry_sub_theme = new Registry(\Drupal::root(), \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_subtheme'); + $registry_sub_theme = new Registry($this->root, \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_subtheme'); $registry_sub_theme->setThemeManager(\Drupal::theme()); - $registry_base_theme = new Registry(\Drupal::root(), \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_basetheme'); + $registry_base_theme = new Registry($this->root, \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_basetheme'); $registry_base_theme->setThemeManager(\Drupal::theme()); $preprocess_functions = $registry_subsub_theme->get()['theme_test_template_test']['preprocess functions']; @@ -111,7 +111,7 @@ class RegistryTest extends KernelTestBase { $theme_handler = \Drupal::service('theme_handler'); $theme_handler->install(['test_theme']); - $registry_theme = new Registry(\Drupal::root(), \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_theme'); + $registry_theme = new Registry($this->root, \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_theme'); $registry_theme->setThemeManager(\Drupal::theme()); $suggestions = ['__kitten', '__flamingo']; @@ -154,7 +154,7 @@ class RegistryTest extends KernelTestBase { $theme_handler->install(['test_theme']); $this->config('system.theme')->set('default', 'test_theme')->save(); - $registry = new Registry(\Drupal::root(), \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_theme'); + $registry = new Registry($this->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']); } @@ -199,13 +199,13 @@ class RegistryTest extends KernelTestBase { $theme_handler = \Drupal::service('theme_handler'); $theme_handler->install(['test_theme']); - $registry_theme = new Registry(\Drupal::root(), \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_theme'); + $registry_theme = new Registry($this->root, \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $theme_handler, \Drupal::service('theme.initialization'), 'test_theme'); $registry_theme->setThemeManager(\Drupal::theme()); $expected = [ 'template_preprocess', 'template_preprocess_container', - 'template_preprocess_theme_test_registered_by_module' + 'template_preprocess_theme_test_registered_by_module', ]; $registry = $registry_theme->get(); $this->assertEquals($expected, array_values($registry['theme_test_registered_by_module']['preprocess functions']));