Commit d66acd16 authored by webchick's avatar webchick

Issue #2130283 by phenaproxima, quietone, samhassell: Variable to config: image.settings [d7]

parent f72ef077
id: d7_image_settings
migration_tags:
- Drupal 7
source:
plugin: variable
variables:
- allow_insecure_derivatives
- suppress_itok_output
- image_style_preview_image
process:
suppress_itok_output: suppress_itok_output
allow_insecure_derivatives: allow_insecure_derivatives
preview_image: image_style_preview_image
destination:
plugin: config
config_name: image.settings
<?php
/**
* @file
* Contains \Drupal\image\Tests\Migrate\d7\MigrateImageSettingsTest.
*/
namespace Drupal\image\Tests\Migrate\d7;
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
/**
* Tests migration of Image variables to configuration.
*
* @group image
*/
class MigrateImageSettingsTest extends MigrateDrupal7TestBase {
public static $modules = ['image'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->executeMigration('d7_image_settings');
}
/**
* Tests the migration.
*/
public function testMigration() {
$config = $this->config('image.settings');
// These settings are not recommended...
$this->assertTrue($config->get('allow_insecure_derivatives'));
$this->assertTrue($config->get('suppress_itok_output'));
$this->assertIdentical("core/modules/image/testsample.png",$config->get('preview_image'));
}
}
...@@ -172,6 +172,9 @@ public function load() { ...@@ -172,6 +172,9 @@ public function load() {
))->values(array( ))->values(array(
'name' => 'forum_nav_vocabulary', 'name' => 'forum_nav_vocabulary',
'value' => 's:1:"2";', 'value' => 's:1:"2";',
))->values(array(
'name' => 'image_style_preview_image',
'value' => 's:33:"core/modules/image/testsample.png";',
))->values(array( ))->values(array(
'name' => 'install_profile', 'name' => 'install_profile',
'value' => 's:8:"standard";', 'value' => 's:8:"standard";',
...@@ -479,4 +482,4 @@ public function load() { ...@@ -479,4 +482,4 @@ public function load() {
} }
} }
#502534c5e998ee5c14f5a2d510b9dc85 #e9148e9bed6f5b345cc1a281afe38dd0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment