Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663
This commit is contained in:
parent
eb34d130a8
commit
f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions
|
@ -26,8 +26,8 @@ class ResponsiveImageTestFormatter extends ResponsiveImageFormatter {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function viewElements(FieldItemListInterface $items) {
|
||||
$elements = parent::viewElements($items);
|
||||
public function viewElements(FieldItemListInterface $items, $langcode) {
|
||||
$elements = parent::viewElements($items, $langcode);
|
||||
// Unset #item_attributes to test that the theme function can handle that.
|
||||
foreach ($elements as &$element) {
|
||||
if (isset($element['#item_attributes'])) {
|
||||
|
|
|
@ -108,7 +108,7 @@ class ResponsiveImageStyleConfigEntityUnitTest extends UnitTestCase {
|
|||
->with('test_group')
|
||||
->willReturn(array('bartik' => 'theme', 'toolbar' => 'module'));
|
||||
|
||||
$dependencies = $entity->calculateDependencies();
|
||||
$dependencies = $entity->calculateDependencies()->getDependencies();
|
||||
$this->assertEquals(['toolbar'], $dependencies['module']);
|
||||
$this->assertEquals(['bartik'], $dependencies['theme']);
|
||||
$this->assertEquals(['image.style.fallback', 'image.style.large', 'image.style.medium', 'image.style.small'], $dependencies['config']);
|
||||
|
@ -208,6 +208,10 @@ class ResponsiveImageStyleConfigEntityUnitTest extends UnitTestCase {
|
|||
'image_mapping_type' => 'image_style',
|
||||
'image_mapping' => 'thumbnail',
|
||||
));
|
||||
$entity->addImageStyleMapping('test_breakpoint2', '2x', array(
|
||||
'image_mapping_type' => 'image_style',
|
||||
'image_mapping' => '_original image_',
|
||||
));
|
||||
|
||||
$expected = array(
|
||||
'test_breakpoint' => array(
|
||||
|
@ -236,6 +240,12 @@ class ResponsiveImageStyleConfigEntityUnitTest extends UnitTestCase {
|
|||
'image_mapping_type' => 'image_style',
|
||||
'image_mapping' => 'thumbnail',
|
||||
),
|
||||
'2x' => array(
|
||||
'breakpoint_id' => 'test_breakpoint2',
|
||||
'multiplier' => '2x',
|
||||
'image_mapping_type' => 'image_style',
|
||||
'image_mapping' => '_original image_',
|
||||
),
|
||||
)
|
||||
);
|
||||
$this->assertEquals($expected, $entity->getKeyedImageStyleMappings());
|
||||
|
@ -252,6 +262,19 @@ class ResponsiveImageStyleConfigEntityUnitTest extends UnitTestCase {
|
|||
'image_mapping' => 'medium',
|
||||
);
|
||||
$this->assertEquals($expected, $entity->getKeyedImageStyleMappings());
|
||||
|
||||
// Overwrite a mapping to ensure keyed mapping static cache is rebuilt.
|
||||
$entity->addImageStyleMapping('test_breakpoint2', '2x', array(
|
||||
'image_mapping_type' => 'image_style',
|
||||
'image_mapping' => 'large',
|
||||
));
|
||||
$expected['test_breakpoint2']['2x'] = array(
|
||||
'breakpoint_id' => 'test_breakpoint2',
|
||||
'multiplier' => '2x',
|
||||
'image_mapping_type' => 'image_style',
|
||||
'image_mapping' => 'large',
|
||||
);
|
||||
$this->assertEquals($expected, $entity->getKeyedImageStyleMappings());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue