Commit 3fff17d0 authored by alexpott's avatar alexpott

Issue #2409453 by quietone, phenaproxima, hussainweb, vprocessor, hosef, chx:...

Issue #2409453 by quietone, phenaproxima, hussainweb, vprocessor, hosef, chx: Variable to config: statistics.settings [d7]
parent 5233c3d2
id: d6_statistics_settings
id: statistics_settings
label: Statistics configuration
migration_tags:
- Drupal 6
- Drupal 7
source:
plugin: variable
variables:
......
......@@ -24,7 +24,7 @@ class MigrateStatisticsConfigsTest extends MigrateDrupal6TestBase {
*/
protected function setUp() {
parent::setUp();
$this->executeMigration('d6_statistics_settings');
$this->executeMigration('statistics_settings');
}
/**
......
<?php
namespace Drupal\Tests\statistics\Kernel\Migrate\d7;
use Drupal\config\Tests\SchemaCheckTestTrait;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
/**
* Upgrade variables to statistics.settings.yml.
*
* @group migrate_drupal_7
*/
class MigrateStatisticsConfigsTest extends MigrateDrupal7TestBase {
use SchemaCheckTestTrait;
/**
* {@inheritdoc}
*/
public static $modules = array('statistics');
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->executeMigration('statistics_settings');
}
/**
* Tests migration of statistics variables to statistics.settings.yml.
*/
public function testStatisticsSettings() {
$config = $this->config('statistics.settings');
$this->assertIdentical(TRUE, $config->get('access_log.enabled'));
$this->assertIdentical(3600, $config->get('access_log.max_lifetime'));
$this->assertIdentical(1, $config->get('count_content_views'));
$this->assertConfigSchema(\Drupal::service('config.typed'), 'statistics.settings', $config->get());
}
}
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