Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542
This commit is contained in:
parent
3b2511d96d
commit
81ccda77eb
2155 changed files with 54307 additions and 46870 deletions
|
@ -169,6 +169,7 @@ class BreakpointManager extends DefaultPluginManager implements BreakpointManage
|
|||
$this->breakpointsByGroup[$group] = $breakpoints;
|
||||
}
|
||||
}
|
||||
|
||||
$instances = array();
|
||||
foreach ($this->breakpointsByGroup[$group] as $plugin_id => $definition) {
|
||||
if (!isset($this->instances[$plugin_id])) {
|
||||
|
|
|
@ -34,34 +34,22 @@ class BreakpointDiscoveryTest extends KernelTestBase {
|
|||
public function testThemeBreakpoints() {
|
||||
// Verify the breakpoint group for breakpoint_theme_test was created.
|
||||
$expected_breakpoints = array(
|
||||
'breakpoint_theme_test.tv' => array(
|
||||
'label' => 'tv',
|
||||
'mediaQuery' => 'only screen and (min-width: 1220px)',
|
||||
'breakpoint_theme_test.mobile' => array(
|
||||
'label' => 'mobile',
|
||||
'mediaQuery' => '(min-width: 0px)',
|
||||
'weight' => 0,
|
||||
'multipliers' => array(
|
||||
'1x',
|
||||
),
|
||||
'provider' => 'breakpoint_theme_test',
|
||||
'id' => 'breakpoint_theme_test.tv',
|
||||
'group' => 'breakpoint_theme_test',
|
||||
'class' => 'Drupal\\breakpoint\\Breakpoint',
|
||||
),
|
||||
'breakpoint_theme_test.wide' => array(
|
||||
'label' => 'wide',
|
||||
'mediaQuery' => '(min-width: 851px)',
|
||||
'weight' => 1,
|
||||
'multipliers' => array(
|
||||
'1x',
|
||||
),
|
||||
'provider' => 'breakpoint_theme_test',
|
||||
'id' => 'breakpoint_theme_test.wide',
|
||||
'id' => 'breakpoint_theme_test.mobile',
|
||||
'group' => 'breakpoint_theme_test',
|
||||
'class' => 'Drupal\\breakpoint\\Breakpoint',
|
||||
),
|
||||
'breakpoint_theme_test.narrow' => array(
|
||||
'label' => 'narrow',
|
||||
'mediaQuery' => '(min-width: 560px)',
|
||||
'weight' => 2,
|
||||
'weight' => 1,
|
||||
'multipliers' => array(
|
||||
'1x',
|
||||
),
|
||||
|
@ -70,15 +58,27 @@ class BreakpointDiscoveryTest extends KernelTestBase {
|
|||
'group' => 'breakpoint_theme_test',
|
||||
'class' => 'Drupal\\breakpoint\\Breakpoint',
|
||||
),
|
||||
'breakpoint_theme_test.mobile' => array(
|
||||
'label' => 'mobile',
|
||||
'mediaQuery' => '(min-width: 0px)',
|
||||
'breakpoint_theme_test.wide' => array(
|
||||
'label' => 'wide',
|
||||
'mediaQuery' => '(min-width: 851px)',
|
||||
'weight' => 2,
|
||||
'multipliers' => array(
|
||||
'1x',
|
||||
),
|
||||
'provider' => 'breakpoint_theme_test',
|
||||
'id' => 'breakpoint_theme_test.wide',
|
||||
'group' => 'breakpoint_theme_test',
|
||||
'class' => 'Drupal\\breakpoint\\Breakpoint',
|
||||
),
|
||||
'breakpoint_theme_test.tv' => array(
|
||||
'label' => 'tv',
|
||||
'mediaQuery' => 'only screen and (min-width: 1220px)',
|
||||
'weight' => 3,
|
||||
'multipliers' => array(
|
||||
'1x',
|
||||
),
|
||||
'provider' => 'breakpoint_theme_test',
|
||||
'id' => 'breakpoint_theme_test.mobile',
|
||||
'id' => 'breakpoint_theme_test.tv',
|
||||
'group' => 'breakpoint_theme_test',
|
||||
'class' => 'Drupal\\breakpoint\\Breakpoint',
|
||||
),
|
||||
|
@ -102,7 +102,7 @@ class BreakpointDiscoveryTest extends KernelTestBase {
|
|||
'breakpoint_theme_test.group2.narrow' => array(
|
||||
'label' => 'narrow',
|
||||
'mediaQuery' => '(min-width: 560px)',
|
||||
'weight' => 2,
|
||||
'weight' => 0,
|
||||
'multipliers' => array(
|
||||
'1x',
|
||||
'2x',
|
||||
|
@ -128,7 +128,7 @@ class BreakpointDiscoveryTest extends KernelTestBase {
|
|||
'breakpoint_module_test.breakpoint_theme_test.group2.tv' => array(
|
||||
'label' => 'tv',
|
||||
'mediaQuery' => '(min-width: 6000px)',
|
||||
'weight' => 0,
|
||||
'weight' => 2,
|
||||
'multipliers' => array(
|
||||
'1x',
|
||||
),
|
||||
|
@ -153,7 +153,7 @@ class BreakpointDiscoveryTest extends KernelTestBase {
|
|||
'breakpoint_module_test.mobile' => array(
|
||||
'label' => 'mobile',
|
||||
'mediaQuery' => '(min-width: 0px)',
|
||||
'weight' => 1,
|
||||
'weight' => 0,
|
||||
'multipliers' => array(
|
||||
'1x',
|
||||
),
|
||||
|
@ -165,7 +165,7 @@ class BreakpointDiscoveryTest extends KernelTestBase {
|
|||
'breakpoint_module_test.standard' => array(
|
||||
'label' => 'standard',
|
||||
'mediaQuery' => '(min-width: 560px)',
|
||||
'weight' => 0,
|
||||
'weight' => 1,
|
||||
'multipliers' => array(
|
||||
'1x',
|
||||
'2x',
|
||||
|
@ -178,9 +178,7 @@ class BreakpointDiscoveryTest extends KernelTestBase {
|
|||
);
|
||||
|
||||
$breakpoints = \Drupal::service('breakpoint.manager')->getBreakpointsByGroup('breakpoint_module_test');
|
||||
foreach ($expected_breakpoints as $id => $expected_breakpoint) {
|
||||
$this->assertEqual($expected_breakpoint, $breakpoints[$id]->getPluginDefinition());
|
||||
}
|
||||
$this->assertEqual(array_keys($expected_breakpoints), array_keys($breakpoints));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
breakpoint_module_test.mobile:
|
||||
label: mobile
|
||||
mediaQuery: '(min-width: 0px)'
|
||||
weight: 1
|
||||
weight: 0
|
||||
# Don't include multipliers. A 1x multiplier this will be enforced by default.
|
||||
breakpoint_module_test.standard:
|
||||
label: standard
|
||||
mediaQuery: '(min-width: 560px)'
|
||||
weight: 0
|
||||
weight: 1
|
||||
# Don't include a 1x multiplier this will be enforced by default.
|
||||
multipliers:
|
||||
- 2x
|
||||
|
@ -15,7 +15,7 @@ breakpoint_module_test.standard:
|
|||
breakpoint_module_test.breakpoint_theme_test.group2.tv:
|
||||
label: tv
|
||||
mediaQuery: '(min-width: 6000px)'
|
||||
weight: 0
|
||||
weight: 2
|
||||
multipliers:
|
||||
- 1x
|
||||
group: breakpoint_theme_test.group2
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
breakpoint_theme_test.mobile:
|
||||
label: mobile
|
||||
mediaQuery: '(min-width: 0px)'
|
||||
weight: 3
|
||||
weight: 0
|
||||
multipliers:
|
||||
- 1x
|
||||
breakpoint_theme_test.narrow:
|
||||
label: narrow
|
||||
mediaQuery: '(min-width: 560px)'
|
||||
weight: 2
|
||||
weight: 1
|
||||
multipliers:
|
||||
- 1x
|
||||
# Out of order breakpoint to test sorting.
|
||||
breakpoint_theme_test.tv:
|
||||
label: tv
|
||||
mediaQuery: 'only screen and (min-width: 1220px)'
|
||||
weight: 0
|
||||
weight: 3
|
||||
multipliers:
|
||||
- 1x
|
||||
breakpoint_theme_test.wide:
|
||||
label: wide
|
||||
mediaQuery: '(min-width: 851px)'
|
||||
weight: 1
|
||||
weight: 2
|
||||
multipliers:
|
||||
- 1x
|
||||
breakpoint_theme_test.group2.narrow:
|
||||
label: narrow
|
||||
mediaQuery: '(min-width: 560px)'
|
||||
weight: 2
|
||||
weight: 0
|
||||
multipliers:
|
||||
- 1x
|
||||
- 2x
|
||||
|
|
Reference in a new issue