Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663

This commit is contained in:
Greg Anderson 2015-10-08 11:40:12 -07:00
parent eb34d130a8
commit f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions

View file

@ -0,0 +1,72 @@
<?php
/**
* @file
* Contains \Drupal\Tests\image\Unit\Plugin\migrate\source\d6\ImageCachePresetTest.
*/
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

@ -0,0 +1,61 @@
<?php
/**
* @file
* Contains \Drupal\Tests\image\Unit\Plugin\migrate\source\d7\MigrateImageStylesTest.
*/
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}
*/
public 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();
}
}