diff --git a/core/modules/system/tests/themes/test_legacy_theme/test_legacy_theme.theme b/core/modules/system/tests/themes/test_legacy_theme/test_legacy_theme.theme deleted file mode 100644 index 9802894955f4602f3f1268db87bb7037355ea554..0000000000000000000000000000000000000000 --- a/core/modules/system/tests/themes/test_legacy_theme/test_legacy_theme.theme +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -/** - * @file - * Theme to test functionality of legacy theme functions. - * - * @todo Remove in https://www.drupal.org/project/drupal/issues/3097889 - */ - -/** - * Tests a theme overriding a suggestion of a base theme hook. - */ -function test_legacy_theme_theme_test_preprocess_suggestions__kitten__meerkat($variables) { - return 'Theme hook implementor=test_theme_theme_test__suggestion(). Foo=' . $variables['foo']; -} - -/** - * Implements hook_theme_suggestions_HOOK_alter(). - */ -function test_legacy_theme_theme_suggestions_theme_test_function_suggestions_alter(array &$suggestions, array $variables) { - // Theme alter hooks run after module alter hooks, so add this theme - // suggestion to the beginning of the array so that the suggestion added by - // the theme_suggestions_test module can be picked up when that module is - // enabled. - array_unshift($suggestions, 'theme_test_function_suggestions__' . 'theme_override'); -} - -/** - * Returns HTML for a theme function suggestion test. - * - * Implements the theme_test_function_suggestions__theme_override suggestion. - */ -function test_legacy_theme_theme_test_function_suggestions__theme_override($variables) { - return 'Theme function overridden based on new theme suggestion provided by the test_legacy_theme theme.'; -} - -/** - * Returns HTML for a theme function suggestion test. - * - * Implements the theme_test_function_suggestions__module_override suggestion. - */ -function test_legacy_theme_theme_test_function_suggestions__module_override($variables) { - return 'Theme function overridden based on new theme suggestion provided by a module.'; -} diff --git a/core/modules/system/tests/themes/test_legacy_theme/test_legacy_theme.info.yml b/core/modules/system/tests/themes/test_theme_with_deprecated_libraries/test_theme_with_deprecated_libraries.info.yml similarity index 59% rename from core/modules/system/tests/themes/test_legacy_theme/test_legacy_theme.info.yml rename to core/modules/system/tests/themes/test_theme_with_deprecated_libraries/test_theme_with_deprecated_libraries.info.yml index 6760629ce6139d4e1dd640b4193ec0dd6efe8c84..0de269b858c842f9656292a1a58be0522a986730 100644 --- a/core/modules/system/tests/themes/test_legacy_theme/test_legacy_theme.info.yml +++ b/core/modules/system/tests/themes/test_theme_with_deprecated_libraries/test_theme_with_deprecated_libraries.info.yml @@ -1,6 +1,6 @@ -name: 'Test legacy theme' +name: 'Test theme with deprecated libraries' type: theme -description: 'Test theme to test deprecated functionality.' +description: 'Test theme to test themes with deprecated libraries.' version: VERSION package: Testing base theme: test_theme @@ -13,4 +13,4 @@ libraries-override: libraries-extend: theme_test/another_deprecated_library: - - test_legacy_theme/library + - test_theme_with_deprecated_libraries/library diff --git a/core/modules/system/tests/themes/test_legacy_theme/test_legacy_theme.libraries.yml b/core/modules/system/tests/themes/test_theme_with_deprecated_libraries/test_theme_with_deprecated_libraries.libraries.yml similarity index 100% rename from core/modules/system/tests/themes/test_legacy_theme/test_legacy_theme.libraries.yml rename to core/modules/system/tests/themes/test_theme_with_deprecated_libraries/test_theme_with_deprecated_libraries.libraries.yml diff --git a/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php index d6afcbea5fe238f1dab30cdd6401153fd0063d0d..4403e73fe87be0d369f39e39aa1cb73476dd146d 100644 --- a/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Asset/LibraryDiscoveryIntegrationTest.php @@ -238,7 +238,7 @@ public function testDeprecatedLibrary() { $this->expectDeprecation('Theme "theme_test" is extending a deprecated library. The "theme_test/another_deprecated_library" asset library is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use another library instead. See https://www.example.com'); $this->expectDeprecation('The "theme_test/deprecated_library" asset library is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use another library instead. See https://www.example.com'); $this->expectDeprecation('The "theme_test/another_deprecated_library" asset library is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. Use another library instead. See https://www.example.com'); - $this->activateTheme('test_legacy_theme'); + $this->activateTheme('test_theme_with_deprecated_libraries'); $this->libraryDiscovery->getLibraryByName('theme_test', 'deprecated_library'); $this->libraryDiscovery->getLibraryByName('theme_test', 'another_deprecated_library'); }