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=f453852d2e9ac23074fb1b618010a9401380d223;hp=a962fecc58f179c768c7f5d784af47149621ba57;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php b/web/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php index a962fecc5..f453852d2 100644 --- a/web/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php +++ b/web/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php @@ -77,7 +77,7 @@ class RegistryTest extends KernelTestBase { $registry_base_theme->setThemeManager(\Drupal::theme()); $preprocess_functions = $registry_subsub_theme->get()['theme_test_template_test']['preprocess functions']; - $this->assertIdentical([ + $this->assertSame([ 'template_preprocess', 'test_basetheme_preprocess_theme_test_template_test', 'test_subtheme_preprocess_theme_test_template_test', @@ -85,20 +85,20 @@ class RegistryTest extends KernelTestBase { ], $preprocess_functions); $preprocess_functions = $registry_sub_theme->get()['theme_test_template_test']['preprocess functions']; - $this->assertIdentical([ + $this->assertSame([ 'template_preprocess', 'test_basetheme_preprocess_theme_test_template_test', 'test_subtheme_preprocess_theme_test_template_test', ], $preprocess_functions); $preprocess_functions = $registry_base_theme->get()['theme_test_template_test']['preprocess functions']; - $this->assertIdentical([ + $this->assertSame([ 'template_preprocess', 'test_basetheme_preprocess_theme_test_template_test', ], $preprocess_functions); $preprocess_functions = $registry_base_theme->get()['theme_test_function_suggestions']['preprocess functions']; - $this->assertIdentical([ + $this->assertSame([ 'template_preprocess_theme_test_function_suggestions', 'test_basetheme_preprocess_theme_test_function_suggestions', ], $preprocess_functions, "Theme functions don't have template_preprocess but do have template_preprocess_HOOK"); @@ -125,7 +125,7 @@ class RegistryTest extends KernelTestBase { $hook .= "$suggestion"; $expected_preprocess_functions[] = "test_theme_preprocess_$hook"; $preprocess_functions = $registry_theme->get()[$hook]['preprocess functions']; - $this->assertIdentical($expected_preprocess_functions, $preprocess_functions, "$hook has correct preprocess functions."); + $this->assertSame($expected_preprocess_functions, $preprocess_functions, "$hook has correct preprocess functions."); } while ($suggestion = array_shift($suggestions)); $expected_preprocess_functions = [ @@ -136,10 +136,10 @@ class RegistryTest extends KernelTestBase { ]; $preprocess_functions = $registry_theme->get()['theme_test_preprocess_suggestions__kitten__meerkat']['preprocess functions']; - $this->assertIdentical($expected_preprocess_functions, $preprocess_functions, 'Suggestion implemented as a function correctly inherits preprocess functions.'); + $this->assertSame($expected_preprocess_functions, $preprocess_functions, 'Suggestion implemented as a function correctly inherits preprocess functions.'); $preprocess_functions = $registry_theme->get()['theme_test_preprocess_suggestions__kitten__bearcat']['preprocess functions']; - $this->assertIdentical($expected_preprocess_functions, $preprocess_functions, 'Suggestion implemented as a template correctly inherits preprocess functions.'); + $this->assertSame($expected_preprocess_functions, $preprocess_functions, 'Suggestion implemented as a template correctly inherits preprocess functions.'); $this->assertTrue(isset($registry_theme->get()['theme_test_preprocess_suggestions__kitten__meerkat__tarsier__moose']), 'Preprocess function with an unimplemented lower-level suggestion is added to the registry.'); } @@ -164,11 +164,11 @@ class RegistryTest extends KernelTestBase { */ public function testThemeSuggestions() { // Mock the current page as the front page. - /** @var PathMatcherInterface $path_matcher */ + /** @var \Drupal\Core\Path\PathMatcherInterface $path_matcher */ $path_matcher = $this->prophesize(PathMatcherInterface::class); $path_matcher->isFrontPage()->willReturn(TRUE); $this->container->set('path.matcher', $path_matcher->reveal()); - /** @var CurrentPathStack $path_matcher */ + /** @var \Drupal\Core\Path\CurrentPathStack $path_matcher */ $path_current = $this->prophesize(CurrentPathStack::class); $path_current->getPath()->willReturn('/node/1'); $this->container->set('path.current', $path_current->reveal());