Issue #2353777 by phenaproxima, joshtaylor, chx: Variable to config: tracker.settings [d7]
parent
bbde5c053b
commit
2fbb1a03e5
core/modules
migrate_drupal/src/Tests/Table/d7
tracker
migration_templates
src/Tests/Migrate/d7
|
@ -355,6 +355,9 @@ class Variable extends DrupalDumpBase {
|
|||
))->values(array(
|
||||
'name' => 'theme_default',
|
||||
'value' => 's:6:"bartik";',
|
||||
))->values(array(
|
||||
'name' => 'tracker_batch_size',
|
||||
'value' => 'i:999;',
|
||||
))->values(array(
|
||||
'name' => 'user_admin_role',
|
||||
'value' => 's:1:"3";',
|
||||
|
@ -467,4 +470,4 @@ class Variable extends DrupalDumpBase {
|
|||
}
|
||||
|
||||
}
|
||||
#b936ad0308ecdde6a8fe71fd158c6719
|
||||
#e0f7be890a222531c707941d0fedf479
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
id: d7_tracker_settings
|
||||
label: Drupal 7 tracker settings
|
||||
migration_tags:
|
||||
- Drupal 7
|
||||
source:
|
||||
plugin: variable
|
||||
variables:
|
||||
- tracker_batch_size
|
||||
process:
|
||||
cron_index_limit: tracker_batch_size
|
||||
destination:
|
||||
plugin: config
|
||||
config_name: tracker.settings
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\tracker\Tests\Migrate\d7\MigrateTrackerSettingsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\tracker\Tests\Migrate\d7;
|
||||
|
||||
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of Tracker settings to configuration.
|
||||
*
|
||||
* @group tracker
|
||||
*/
|
||||
class MigrateTrackerSettingsTest extends MigrateDrupal7TestBase {
|
||||
|
||||
public static $modules = ['tracker'];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
parent::setUp();
|
||||
$this->installConfig(['tracker']);
|
||||
$this->loadDumps(['Variable.php']);
|
||||
$this->executeMigration('d7_tracker_settings');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of tracker's variables to configuration.
|
||||
*/
|
||||
public function testMigration() {
|
||||
$this->assertIdentical(999, \Drupal::config('tracker.settings')->get('cron_index_limit'));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue