Commit 97ded670 authored by alexpott's avatar alexpott

Issue #2500529 by phenaproxima, bdimaggio: Migration path for Syslog 7.x configuration

parent 978fcf0c
......@@ -325,6 +325,15 @@ public function load() {
))->values(array(
'name' => 'suppress_itok_output',
'value' => 'b:1;',
))->values(array(
'name' => 'syslog_facility',
'value' => 'i:8;',
))->values(array(
'name' => 'syslog_format',
'value' => 's:72:"!base_url|!timestamp|!type|!ip|!request_uri|!referer|!uid|!link|!message";',
))->values(array(
'name' => 'syslog_identity',
'value' => 's:6:"drupal";',
))->values(array(
'name' => 'theme_default',
'value' => 's:6:"bartik";',
......@@ -440,4 +449,4 @@ public function load() {
}
}
#6e1892883e650f9e71e165fa6737ac4c
#5b6552f715939e2b33c22779e47e73e3
id: d7_syslog_settings
label: Drupal 7 syslog configuration
migration_tags:
- Drupal 7
source:
plugin: variable
variables:
- syslog_facility
- syslog_format
- syslog_identity
process:
facility: syslog_facility
format: syslog_format
identity: syslog_identity
destination:
plugin: config
config_name: syslog.settings
<?php
/**
* @file
* Contains \Drupal\syslog\Tests\Migrate\d7\MigrateSyslogConfigsTest.
*/
namespace Drupal\syslog\Tests\Migrate\d7;
use Drupal\config\Tests\SchemaCheckTestTrait;
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
/**
* Upgrade variables to syslog.settings.yml.
*
* @group syslog
*/
class MigrateSyslogConfigsTest extends MigrateDrupal7TestBase {
use SchemaCheckTestTrait;
/**
* Modules to enable.
*
* @var array
*/
public static $modules = ['syslog'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->installConfig(static::$modules);
$this->loadDumps(['Variable.php']);
$this->executeMigration('d7_syslog_settings');
}
/**
* Tests migration of syslog variables to syslog.settings.yml.
*/
public function testSyslogSettings() {
$config = $this->config('syslog.settings');
// 8 == LOG_USER
$this->assertIdentical('8', $config->get('facility'));
$this->assertIdentical('!base_url|!timestamp|!type|!ip|!request_uri|!referer|!uid|!link|!message', $config->get('format'));
$this->assertIdentical('drupal', $config->get('identity'));
}
}
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