Update to Drupal 8.2.2. For more information, see https://www.drupal.org/project/drupal/releases/8.2.2

This commit is contained in:
Pantheon Automation 2016-11-02 11:43:31 -07:00 committed by Greg Anderson
parent 23ffed3665
commit 507b45a0ed
378 changed files with 11434 additions and 5542 deletions

View file

@ -18,15 +18,15 @@
*/
#}
{% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }}
{{ data.width }}×{{ data.height }}
{%- else -%}
{% if data.width %}
{% trans %}
width {{ data.width|e }}
width {{ data.width }}
{% endtrans %}
{% elseif data.height %}
{% trans %}
height {{ data.height|e }}
height {{ data.height }}
{% endtrans %}
{% endif %}
{%- endif %}

View file

@ -16,15 +16,15 @@
*/
#}
{% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }}
{{ data.width }}×{{ data.height }}
{%- else -%}
{% if data.width %}
{% trans %}
width {{ data.width|e }}
width {{ data.width }}
{% endtrans %}
{% elseif data.height %}
{% trans %}
height {{ data.height|e }}
height {{ data.height }}
{% endtrans %}
{% endif %}
{%- endif %}

View file

@ -19,8 +19,9 @@
*/
#}
{% if data.random %}
{% set degrees = data.degrees|abs %}
{% trans %}
random between -{{ data.degrees|abs }}° and {{ data.degrees|abs }}°
random between -{{ degrees }}° and {{ degrees }}°
{% endtrans %}
{% else %}
{{ data.degrees }}°

View file

@ -17,15 +17,15 @@
*/
#}
{% if data.width and data.height -%}
{{ data.width|e }}×{{ data.height|e }}
{{ data.width }}×{{ data.height }}
{%- else -%}
{% if data.width %}
{% trans %}
width {{ data.width|e }}
width {{ data.width }}
{% endtrans %}
{% elseif data.height %}
{% trans %}
height {{ data.height|e }}
height {{ data.height }}
{% endtrans %}
{% endif %}
{%- endif %}

View file

@ -0,0 +1,69 @@
<?php
namespace Drupal\Tests\image\Kernel\Plugin\migrate\source\d6;
use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
/**
* Tests the d6_imagecache_presets source plugin.
*
* @covers \Drupal\image\Plugin\migrate\source\d6\ImageCachePreset
*
* @group image
*/
class ImageCachePresetTest extends MigrateSqlSourceTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['image', 'migrate_drupal'];
/**
* {@inheritdoc}
*/
public function providerSource() {
$tests = [];
// The source data.
$tests[0]['source_data']['imagecache_preset'] = [
[
'presetid' => '1',
'presetname' => 'slackjaw_boys',
],
];
$tests[0]['source_data']['imagecache_action'] = [
[
'actionid' => '3',
'presetid' => '1',
'weight' => '0',
'module' => 'imagecache',
'action' => 'imagecache_scale_and_crop',
'data' => 'a:2:{s:5:"width";s:4:"100%";s:6:"height";s:4:"100%";}',
],
];
// The expected results.
$tests[0]['expected_data'] = [
[
'presetid' => '1',
'presetname' => 'slackjaw_boys',
'actions' => [
[
'actionid' => '3',
'presetid' => '1',
'weight' => '0',
'module' => 'imagecache',
'action' => 'imagecache_scale_and_crop',
'data' => [
'width' => '100%',
'height' => '100%',
],
],
],
],
];
return $tests;
}
}

View file

@ -0,0 +1,66 @@
<?php
namespace Drupal\Tests\image\Kernel\Plugin\migrate\source\d7;
use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
/**
* Tests the D7 ImageStyles source plugin.
*
* @covers \Drupal\image\Plugin\migrate\source\d7\ImageStyles
*
* @group image
*/
class ImageStylesTest extends MigrateSqlSourceTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['image', 'migrate_drupal'];
/**
* {@inheritdoc}
*/
public function providerSource() {
$tests = [];
// The source data.
$tests[0]['source_data']['image_styles'] = [
[
'isid' => 1,
'name' => 'custom_image_style_1',
'label' => 'Custom image style 1',
],
];
$tests[0]['source_data']['image_effects'] = [
[
'ieid' => 1,
'isid' => 1,
'weight' => 1,
'name' => 'image_desaturate',
'data' => serialize(array()),
],
];
// The expected results.
$tests[0]['expected_data'] = [
[
'isid' => 1,
'name' => 'custom_image_style_1',
'label' => 'Custom image style 1',
'effects' => [
[
'ieid' => 1,
'isid' => 1,
'weight' => 1,
'name' => 'image_desaturate',
'data' => [],
],
],
],
];
return $tests;
}
}

View file

@ -1,67 +0,0 @@
<?php
namespace Drupal\Tests\image\Unit\Plugin\migrate\source\d6;
use Drupal\image\Plugin\migrate\source\d6\ImageCachePreset;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
/**
* Tests the d6_imagecache_presets source plugin.
*
* @group image
*/
class ImageCachePresetTest extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = ImageCachePreset::class;
protected $migrationConfiguration = array(
'id' => 'test',
'source' => array(
'plugin' => 'd6_imagecache_presets',
),
);
protected $expectedResults = array(
array(
'presetid' => '1',
'presetname' => 'slackjaw_boys',
'actions' => array(
array(
'actionid' => '3',
'presetid' => '1',
'weight' => '0',
'module' => 'imagecache',
'action' => 'imagecache_scale_and_crop',
'data' => array(
'width' => '100%',
'height' => '100%',
),
),
),
),
);
/**
* {@inheritdoc}
*/
protected function setUp() {
$this->databaseContents['imagecache_preset'] = array(
array(
'presetid' => '1',
'presetname' => 'slackjaw_boys',
),
);
$this->databaseContents['imagecache_action'] = array(
array(
'actionid' => '3',
'presetid' => '1',
'weight' => '0',
'module' => 'imagecache',
'action' => 'imagecache_scale_and_crop',
'data' => 'a:2:{s:5:"width";s:4:"100%";s:6:"height";s:4:"100%";}',
),
);
parent::setUp();
}
}

View file

@ -1,56 +0,0 @@
<?php
namespace Drupal\Tests\image\Unit\Plugin\migrate\source\d7;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
/**
* Tests D7 ImageStyles source plugin.
*
* @group image
*/
class MigrateImageStylesTest extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = 'Drupal\image\Plugin\migrate\source\d7\ImageStyles';
protected $migrationConfiguration = [
'id' => 'test',
'source' => [
'plugin' => 'd7_image_styles',
],
];
protected $expectedResults = [
[
'isid' => 1,
'name' => 'custom_image_style_1',
'label' => 'Custom image style 1',
'effects' => [
[
'ieid' => 1,
'isid' => 1,
'weight' => 1,
'name' => 'image_desaturate',
'data' => [],
]
]
],
];
/**
* {@inheritdoc}
*/
protected function setUp() {
foreach ($this->expectedResults as $k => $row) {
foreach (array('isid', 'name', 'label') as $field) {
$this->databaseContents['image_styles'][$k][$field] = $row[$field];
}
foreach ($row['effects'] as $id => $effect) {
$row['effects'][$id]['data'] = serialize($row['effects'][$id]['data']);
}
$this->databaseContents['image_effects'] = $row['effects'];
}
parent::setUp();
}
}