Skip to content
Snippets Groups Projects
Verified Commit 5e0ff5a8 authored by Dave Long's avatar Dave Long
Browse files

Issue #3457863 by grimreaper, catch, pdureau, maboy, longwave: YAML discovery...

Issue #3457863 by grimreaper, catch, pdureau, maboy, longwave: YAML discovery does not take theme inheritance into account
parent 79a49040
No related branches found
No related tags found
22 merge requests!12227Issue #3181946 by jonmcl, mglaman,!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!8736Update the Documention As per the Function uses.,!8513Issue #3453786: DefaultSelection should document why values for target_bundles NULL and [] behave as they do,!5423Draft: Resolve #3329907 "Test2",!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!3742Issue #3328429: Create item list field formatter for displaying ordered and unordered lists,!3731Claro: role=button on status report items,!3478Issue #3337882: Deleted menus are not removed from content type config,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!3133core/modules/system/css/components/hidden.module.css,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2812Issue #3312049: [Followup] Fix Drupal.Commenting.FunctionComment.MissingReturnType returns for NULL,!2378Issue #2875033: Optimize joins and table selection in SQL entity query implementation,!2062Issue #3246454: Add weekly granularity to views date sort,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!877Issue #2708101: Default value for link text is not saved,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493,!213Issue #2906496: Give Media a menu item under Content
Pipeline #293056 passed with warnings
Pipeline: drupal

#293086

    Pipeline: drupal

    #293077

      Pipeline: drupal

      #293066

        ......@@ -69,8 +69,10 @@ public function listInfo() {
        $this->list = [];
        $installed_themes = $this->configFactory->get('core.extension')->get('theme');
        if (!empty($installed_themes)) {
        $installed_themes = array_intersect_key($this->themeList->getList(), $installed_themes);
        array_map([$this, 'addTheme'], $installed_themes);
        $list = $this->themeList->getList();
        foreach (array_keys($installed_themes) as $theme_name) {
        $this->addTheme($list[$theme_name]);
        }
        }
        }
        return $this->list;
        ......
        name: 'Theme test child theme'
        type: theme
        version: VERSION
        base theme: test_parent_theme
        theme_parent_provided_layout:
        class: '\Drupal\Core\Layout\LayoutDefault'
        label: Child
        name: 'Theme test parent theme'
        type: theme
        version: VERSION
        base theme: false
        theme_parent_provided_layout:
        class: '\Drupal\Core\Layout\LayoutDefault'
        label: Parent
        <?php
        declare(strict_types=1);
        namespace Drupal\KernelTests\Core\Layout;
        use Drupal\Core\Layout\LayoutDefinition;
        use Drupal\KernelTests\KernelTestBase;
        /**
        * @coversDefaultClass \Drupal\Core\Layout\LayoutPluginManager
        * @group Layout
        */
        class LayoutPluginManagerTest extends KernelTestBase {
        /**
        * {@inheritdoc}
        */
        protected static $modules = ['layout_discovery'];
        /**
        * {@inheritdoc}
        */
        protected function setUp(): void {
        parent::setUp();
        $this->container->get('theme_installer')->install(['test_child_theme']);
        $this->activateTheme('test_child_theme');
        }
        /**
        * Tests that layout plugins are correctly overridden.
        */
        public function testPluginOverride(): void {
        /** @var \Drupal\Core\Layout\LayoutPluginManagerInterface $layouts_manager */
        $layouts_manager = $this->container->get('plugin.manager.core.layout');
        $definitions = $layouts_manager->getDefinitions();
        $this->assertInstanceOf(LayoutDefinition::class, $definitions['theme_parent_provided_layout']);
        $this->assertSame('Child', $definitions['theme_parent_provided_layout']->getLabel()->render());
        }
        /**
        * Activates a specified theme.
        *
        * Installs the theme if not already installed and makes it the active theme.
        *
        * @param string $theme_name
        * The name of the theme to be activated.
        */
        protected function activateTheme(string $theme_name): void {
        $this->container->get('theme_installer')->install([$theme_name]);
        /** @var \Drupal\Core\Theme\ThemeInitializationInterface $theme_initializer */
        $theme_initializer = $this->container->get('theme.initialization');
        /** @var \Drupal\Core\Theme\ThemeManagerInterface $theme_manager */
        $theme_manager = $this->container->get('theme.manager');
        $theme_manager->setActiveTheme($theme_initializer->getActiveThemeByName($theme_name));
        $this->assertSame($theme_name, $theme_manager->getActiveTheme()->getName());
        }
        }
        ......@@ -87,8 +87,8 @@ public function testInstall(): void {
        * Tests installing a sub-theme.
        */
        public function testInstallSubTheme(): void {
        $name = 'test_subtheme';
        $base_name = 'test_basetheme';
        $name = 'test_child_theme';
        $base_name = 'test_parent_theme';
        $themes = $this->themeHandler()->listInfo();
        $this->assertEmpty(array_keys($themes));
        ......@@ -99,6 +99,12 @@ public function testInstallSubTheme(): void {
        $this->assertTrue(isset($themes[$name]));
        $this->assertTrue(isset($themes[$base_name]));
        $expectedOrder = [
        $base_name,
        $name,
        ];
        $this->assertEquals($expectedOrder, array_keys($themes));
        $this->themeInstaller()->uninstall([$name]);
        $themes = $this->themeHandler()->listInfo();
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment