diff --git a/core/modules/migrate_drupal/config/migrate.migration.d6_search_settings.yml b/core/modules/migrate_drupal/config/migrate.migration.d6_search_settings.yml index 1efa73b..7ea5c20 100644 --- a/core/modules/migrate_drupal/config/migrate.migration.d6_search_settings.yml +++ b/core/modules/migrate_drupal/config/migrate.migration.d6_search_settings.yml @@ -11,8 +11,6 @@ process: 'index:minimum_word_size': minimum_word_size 'index:overlap_cjk': overlap_cjk 'index:cron_limit': search_cron_limit - 'index:tag_weights': search_tag_weights - and_or_limit: search_and_or_limit destination: plugin: d8_config config_name: search.settings diff --git a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SearchSettings.php b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SearchSettings.php index 4c12235..0b9d5af 100644 --- a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SearchSettings.php +++ b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SearchSettings.php @@ -38,27 +38,6 @@ public static function load(Connection $database) { 'name' => 'search_cron_limit', 'value' => 's:3:"100";', )) - ->values(array( - 'name' => 'search_tag_weights', - 'value' => serialize(array( - 'h1' => 25, - 'h2' => 18, - 'h3' => 15, - 'h4' => 12, - 'h5' => 9, - 'h6' => 6, - 'u' => 3, - 'b' => 3, - 'i' => 3, - 'strong' => 3, - 'em' => 3, - 'a' => 10, - )), - )) - ->values(array( - 'name' => 'search_and_or_limit', - 'value' => 'i:7;', - )) ->execute(); } } diff --git a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SyslogSettings.php b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SyslogSettings.php index 64900b2..ac0016b 100644 --- a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SyslogSettings.php +++ b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SyslogSettings.php @@ -21,8 +21,6 @@ class Drupal6SyslogSettings { * The database connection. */ public static function load(Connection $database) { - $facility = defined('LOG_LOCAL0') ? LOG_LOCAL0 : LOG_USER; - Drupal6DumpCommon::createVariable($database); $database->insert('variable')->fields(array( 'name', @@ -30,7 +28,7 @@ public static function load(Connection $database) { )) ->values(array( 'name' => 'syslog_facility', - 'value' => serialize($facility), + 'value' => 'i:128;', )) ->values(array( 'name' => 'syslog_identity', diff --git a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemSite.php b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemSite.php index f1f47a4..2310fb5 100644 --- a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemSite.php +++ b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemSite.php @@ -28,31 +28,31 @@ public static function load(Connection $database) { )) ->values(array( 'name' => 'site_name', - 'value' => serialize('Drupal'), + 'value' => 's:9:"site_name";', )) ->values(array( 'name' => 'site_mail', - 'value' => serialize('admin@example.com'), + 'value' => 's:21:"site_mail@example.com";', )) ->values(array( 'name' => 'site_slogan', - 'value' => serialize('Migrate rocks'), + 'value' => 's:13:"Migrate rocks";', )) ->values(array( 'name' => 'site_frontpage', - 'value' => serialize('anonymous-hp'), + 'value' => 's:4:"node";', )) ->values(array( 'name' => 'site_403', - 'value' => serialize('user'), + 'value' => 's:4:"user";', )) ->values(array( 'name' => 'site_404', - 'value' => serialize('page-not-found'), + 'value' => 's:14:"page-not-found";', )) ->values(array( 'name' => 'admin_compact_mode', - 'value' => serialize(FALSE), + 'value' => 'b:0;', )) ->execute(); } diff --git a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSearchConfigsTest.php b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSearchConfigsTest.php index ff7ef66..414296f 100644 --- a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSearchConfigsTest.php +++ b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSearchConfigsTest.php @@ -42,21 +42,5 @@ public function testSearchSettings() { $this->assertIdentical($config->get('index.minimum_word_size'), 3); $this->assertIdentical($config->get('index.overlap_cjk'), TRUE); $this->assertIdentical($config->get('index.cron_limit'), 100); - // Not sure where these two variables are set in D6. - $this->assertIdentical($config->get('index.tag_weights'), array( - 'h1' => 25, - 'h2' => 18, - 'h3' => 15, - 'h4' => 12, - 'h5' => 9, - 'h6' => 6, - 'u' => 3, - 'b' => 3, - 'i' => 3, - 'strong' => 3, - 'em' => 3, - 'a' => 10, - )); - $this->assertIdentical($config->get('and_or_limit'), 7); } } diff --git a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSyslogConfigsTest.php b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSyslogConfigsTest.php index 61cbd24..1f29060 100644 --- a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSyslogConfigsTest.php +++ b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSyslogConfigsTest.php @@ -35,13 +35,12 @@ public function testSyslogSettings() { $dumps = array( drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SyslogSettings.php', ); - $facility = defined('LOG_LOCAL0') ? LOG_LOCAL0 : LOG_USER; $this->prepare($migration, $dumps); $executable = new MigrateExecutable($migration, new MigrateMessage()); $executable->import(); $config = \Drupal::config('syslog.settings'); $this->assertIdentical($config->get('identity'), 'drupal'); - // @TODO: remove this typecast once there's schema of rhtis config. - $this->assertIdentical($config->get('facility'), (string) $facility); + // @TODO: change this to integer once there's schema of this config. + $this->assertIdentical($config->get('facility'), '128'); } } diff --git a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSystemConfigsTest.php b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSystemConfigsTest.php index 843a1b2..fa3cb8e 100644 --- a/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSystemConfigsTest.php +++ b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateSystemConfigsTest.php @@ -116,12 +116,12 @@ public function testSystemSite() { $executable = new MigrateExecutable($migration, new MigrateMessage()); $executable->import(); $config = \Drupal::config('system.site'); - $this->assertIdentical($config->get('name'), 'Drupal'); - $this->assertIdentical($config->get('mail'), 'admin@example.com'); + $this->assertIdentical($config->get('name'), 'site_name'); + $this->assertIdentical($config->get('mail'), 'site_mail@example.com'); $this->assertIdentical($config->get('slogan'), 'Migrate rocks'); $this->assertIdentical($config->get('page.403'), 'user'); $this->assertIdentical($config->get('page.404'), 'page-not-found'); - $this->assertIdentical($config->get('page.front'), 'anonymous-hp'); + $this->assertIdentical($config->get('page.front'), 'node'); $this->assertIdentical($config->get('admin_compact_mode'), FALSE); } @@ -181,6 +181,8 @@ public function testSystemFile() { $this->prepare($migration, $dumps); $executable = new MigrateExecutable($migration, new MigrateMessage()); $executable->import(); + // @TODO remove once https://drupal.org/node/2098119 is in. + // Simpletest overrides the system.file config. config_context_enter('config.context.free'); $config = \Drupal::config('system.file'); $this->assertIdentical($config->get('path.private'), 'files/test');