Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
|
@ -33,6 +33,17 @@ class LayoutTest extends KernelTestBase {
|
|||
$this->layoutPluginManager = $this->container->get('plugin.manager.core.layout');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that a layout provided by a theme has the preprocess function set.
|
||||
*/
|
||||
public function testThemeProvidedLayout() {
|
||||
$this->container->get('theme_installer')->install(['test_layout_theme']);
|
||||
$this->config('system.theme')->set('default', 'test_layout_theme')->save();
|
||||
|
||||
$theme_definitions = $this->container->get('theme.registry')->get();
|
||||
$this->assertTrue(in_array('template_preprocess_layout', $theme_definitions['test_layout_theme']['preprocess functions']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test rendering a layout.
|
||||
*
|
||||
|
@ -82,7 +93,7 @@ class LayoutTest extends KernelTestBase {
|
|||
public function renderLayoutData() {
|
||||
$html = [];
|
||||
$html[] = '<div data-drupal-selector="edit-layout" class="layout layout--onecol">';
|
||||
$html[] = '<div class="layout__region layout__region--content">';
|
||||
$html[] = '<div data-drupal-selector="edit-content" class="layout__region layout__region--content">';
|
||||
$html[] = 'This is the content';
|
||||
$html[] = '</div>';
|
||||
$html[] = '</div>';
|
||||
|
@ -98,11 +109,11 @@ class LayoutTest extends KernelTestBase {
|
|||
];
|
||||
|
||||
$html = [];
|
||||
$html[] = '<div class="layout-example-1col clearfix">';
|
||||
$html[] = '<div class="region-top">';
|
||||
$html[] = '<div data-drupal-selector="edit-layout" class="layout-example-1col clearfix">';
|
||||
$html[] = '<div data-drupal-selector="edit-top" class="region-top">';
|
||||
$html[] = 'This string added by #process.';
|
||||
$html[] = '</div>';
|
||||
$html[] = '<div class="region-bottom">';
|
||||
$html[] = '<div data-drupal-selector="edit-bottom" class="region-bottom">';
|
||||
$html[] = 'This is the bottom';
|
||||
$html[] = '</div>';
|
||||
$html[] = '</div>';
|
||||
|
@ -121,11 +132,11 @@ class LayoutTest extends KernelTestBase {
|
|||
];
|
||||
|
||||
$html = [];
|
||||
$html[] = '<div class="layout-example-1col clearfix">';
|
||||
$html[] = '<div class="region-top">';
|
||||
$html[] = '<div data-drupal-selector="edit-layout" class="layout-example-1col clearfix">';
|
||||
$html[] = '<div data-drupal-selector="edit-top" class="region-top">';
|
||||
$html[] = 'This is the top';
|
||||
$html[] = '</div>';
|
||||
$html[] = '<div class="region-bottom">';
|
||||
$html[] = '<div data-drupal-selector="edit-bottom" class="region-bottom">';
|
||||
$html[] = 'This is the bottom';
|
||||
$html[] = '</div>';
|
||||
$html[] = '</div>';
|
||||
|
@ -145,10 +156,10 @@ class LayoutTest extends KernelTestBase {
|
|||
|
||||
$html = [];
|
||||
$html[] = '<div data-drupal-selector="edit-layout" class="layout layout--layout-test-1col-no-template">';
|
||||
$html[] = '<div class="layout__region layout__region--top">';
|
||||
$html[] = '<div data-drupal-selector="edit-top" class="layout__region layout__region--top">';
|
||||
$html[] = 'This is the top';
|
||||
$html[] = '</div>';
|
||||
$html[] = '<div class="layout__region layout__region--bottom">';
|
||||
$html[] = '<div data-drupal-selector="edit-bottom" class="layout__region layout__region--bottom">';
|
||||
$html[] = 'This is the bottom';
|
||||
$html[] = '</div>';
|
||||
$html[] = '</div>';
|
||||
|
@ -167,11 +178,11 @@ class LayoutTest extends KernelTestBase {
|
|||
];
|
||||
|
||||
$html = [];
|
||||
$html[] = '<div class="layout-example-2col clearfix">';
|
||||
$html[] = '<div class="region-left">';
|
||||
$html[] = '<div data-drupal-selector="edit-layout" class="layout-example-2col clearfix">';
|
||||
$html[] = '<div data-drupal-selector="edit-left" class="class-added-by-preprocess region-left">';
|
||||
$html[] = 'This is the left';
|
||||
$html[] = '</div>';
|
||||
$html[] = '<div class="region-right">';
|
||||
$html[] = '<div data-drupal-selector="edit-right" class="region-right">';
|
||||
$html[] = 'This is the right';
|
||||
$html[] = '</div>';
|
||||
$html[] = '</div>';
|
||||
|
@ -190,12 +201,12 @@ class LayoutTest extends KernelTestBase {
|
|||
];
|
||||
|
||||
$html = [];
|
||||
$html[] = '<div class="layout-test-plugin clearfix">';
|
||||
$html[] = '<div data-drupal-selector="edit-layout" class="layout-test-plugin clearfix">';
|
||||
$html[] = '<div>';
|
||||
$html[] = '<span class="setting-1-label">Blah: </span>';
|
||||
$html[] = 'Config value';
|
||||
$html[] = '</div>';
|
||||
$html[] = '<div class="region-main">';
|
||||
$html[] = '<div data-drupal-selector="edit-main" class="region-main">';
|
||||
$html[] = 'Main region';
|
||||
$html[] = '</div>';
|
||||
$html[] = '</div>';
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{{ content.content }}
|
|
@ -0,0 +1,6 @@
|
|||
name: 'Test layout theme'
|
||||
type: theme
|
||||
description: 'Theme for testing a theme-provided layout'
|
||||
version: VERSION
|
||||
base theme: classy
|
||||
core: 8.x
|
|
@ -0,0 +1,7 @@
|
|||
test_layout_theme:
|
||||
label: 'Test Layout - Theme'
|
||||
category: 'Test Layout Theme'
|
||||
template: templates/test-layout-theme
|
||||
regions:
|
||||
content:
|
||||
label: Content
|
Reference in a new issue