Issue #2154955 by bdone, chx, cosmicdreams, jacintocapote, jessehs, jibran, marvil07, mpgeek: Migrate variables to config
parent
1c4af85ac6
commit
ad3f2c7422
|
@ -0,0 +1,10 @@
|
|||
id: d6_action_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- actions_max_stack
|
||||
process:
|
||||
recursion_limit: actions_max_stack
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: action.settings
|
|
@ -0,0 +1,24 @@
|
|||
id: d6_aggregator_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- aggregator_fetcher
|
||||
- aggregator_parser
|
||||
- aggregator_processors
|
||||
- aggregator_allowed_html_tags
|
||||
- aggregator_teaser_length
|
||||
- aggregator_clear
|
||||
- aggregator_summary_items
|
||||
- aggregator_category_selector
|
||||
process:
|
||||
fetcher: aggregator_fetcher
|
||||
parser: aggregator_parser
|
||||
processors: aggregator_processors
|
||||
'items:allowed_html': aggregator_allowed_html_tags
|
||||
'items:teaser_length': aggregator_teaser_length
|
||||
'items:expire': aggregator_clear
|
||||
'source:list_max': aggregator_summary_items
|
||||
'source:category_selector': aggregator_category_selector
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: aggregator.settings
|
|
@ -0,0 +1,14 @@
|
|||
id: d6_book_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- book_child_type
|
||||
- book_block_mode
|
||||
- book_allowed_types
|
||||
process:
|
||||
child_type: book_child_type
|
||||
'block:navigation:mode': book_block_mode
|
||||
allowed_types: book_allowed_types
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: book.settings
|
|
@ -0,0 +1,12 @@
|
|||
id: d6_contact_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- contact_default_status
|
||||
- contact_hourly_threshold
|
||||
process:
|
||||
user_default_enabled: contact_default_status
|
||||
'flood:limit': contact_hourly_threshold
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: contact.settings
|
|
@ -0,0 +1,10 @@
|
|||
id: d6_dblog_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- dblog_row_limit
|
||||
process:
|
||||
row_limit: dblog_row_limit
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: dblog.settings
|
|
@ -0,0 +1,10 @@
|
|||
id: d6_field_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- field_language_fallback
|
||||
process:
|
||||
language_fallback: field_language_fallback
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: field.settings
|
|
@ -0,0 +1,14 @@
|
|||
id: d6_file_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- file_description_type
|
||||
- file_description_length
|
||||
- file_icon_directory
|
||||
process:
|
||||
'description:type': file_description_type
|
||||
'description:length': file_description_length
|
||||
'icon:directory': file_icon_directory
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: file.settings
|
|
@ -0,0 +1,18 @@
|
|||
id: d6_forum_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- forum_hot_topic
|
||||
- forum_per_page
|
||||
- forum_order
|
||||
- forum_block_num_0
|
||||
- forum_block_num_1
|
||||
process:
|
||||
'block:active:limit': forum_block_num_0
|
||||
'block:new:limit': forum_block_num_1
|
||||
'topics:hot_threshold': forum_hot_topic
|
||||
'topics:page_limit': forum_per_page
|
||||
'topics:order': forum_order
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: forum.settings
|
|
@ -0,0 +1,12 @@
|
|||
id: d6_locale_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- locale_cache_strings
|
||||
- locale_js_directory
|
||||
process:
|
||||
cache_string: locale_cache_strings
|
||||
'javascript:directory': locale_js_directory
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: locale.settings
|
|
@ -0,0 +1,14 @@
|
|||
id: d6_menu_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- menu_primary_links_source
|
||||
- menu_secondary_links_source
|
||||
- menu_override_parent_selector
|
||||
process:
|
||||
main_links: menu_primary_links_source
|
||||
secondary_links: menu_secondary_links_source
|
||||
override_parent_selector: menu_override_parent_selector
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: menu.settings
|
|
@ -0,0 +1,10 @@
|
|||
id: d6_node_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- node_admin_theme
|
||||
process:
|
||||
use_admin_theme: node_admin_theme
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: node.settings
|
|
@ -0,0 +1,16 @@
|
|||
id: d6_search_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- minimum_word_size
|
||||
- overlap_cjk
|
||||
- search_cron_limit
|
||||
- search_tag_weights
|
||||
- search_and_or_limit
|
||||
process:
|
||||
'index:minimum_word_size': minimum_word_size
|
||||
'index:overlap_cjk': overlap_cjk
|
||||
'index:cron_limit': search_cron_limit
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: search.settings
|
|
@ -0,0 +1,18 @@
|
|||
id: d6_simpletest_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- simpletest_clear_results
|
||||
- simpletest_httpauth_method
|
||||
- simpletest_httpauth_password
|
||||
- simpletest_httpauth_username
|
||||
- simpletest_verbose
|
||||
process:
|
||||
clear_results: simpletest_clear_results
|
||||
'httpauth:method': simpletest_httpauth_method
|
||||
'httpauth:password': simpletest_httpauth_password
|
||||
'httpauth:username': simpletest_httpauth_username
|
||||
verbose: simpletest_verbose
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: simpletest.settings
|
|
@ -0,0 +1,20 @@
|
|||
id: d6_statistics_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- statistics_enable_access_log
|
||||
- statistics_flush_accesslog_timer
|
||||
- statistics_count_content_views
|
||||
- statistics_block_top_day_num
|
||||
- statistics_block_top_all_num
|
||||
- statistics_block_top_last_num
|
||||
process:
|
||||
'access_log:enable': statistics_enable_access_log
|
||||
'access_log:max_lifetime': statistics_flush_accesslog_timer
|
||||
'count_content_views': statistics_count_content_views
|
||||
'block:popular:top_day_limit': statistics_block_top_day_num
|
||||
'block:popular:top_all_limit': statistics_block_top_all_num
|
||||
'block:popular:top_recent_limit': statistics_block_top_last_num
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: statistics.settings
|
|
@ -0,0 +1,12 @@
|
|||
id: d6_syslog_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- syslog_identity
|
||||
- syslog_facility
|
||||
process:
|
||||
identity: syslog_identity
|
||||
facility: syslog_facility
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: syslog.settings
|
|
@ -0,0 +1,12 @@
|
|||
id: d6_system_file
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- file_directory_path
|
||||
- file_directory_temp
|
||||
process:
|
||||
'path:private': file_directory_path
|
||||
'path:temporary': file_directory_temp
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: system.file
|
|
@ -0,0 +1,10 @@
|
|||
id: d6_system_filter
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- filter_allowed_protocols
|
||||
process:
|
||||
protocols: filter_allowed_protocols
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: system.filter
|
|
@ -0,0 +1,10 @@
|
|||
id: d6_system_image
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- image_toolkit
|
||||
process:
|
||||
toolkit: image_toolkit
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: system.image
|
|
@ -0,0 +1,10 @@
|
|||
id: d6_system_image_gd
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- image_jpeg_quality
|
||||
process:
|
||||
jpeg_quality: image_jpeg_quality
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: system.image.gd
|
|
@ -0,0 +1,12 @@
|
|||
id: d6_system_maintenance
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- site_offline
|
||||
- site_offline_message
|
||||
process:
|
||||
enable: site_offline
|
||||
message: site_offline_message
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: system.maintenance
|
|
@ -0,0 +1,12 @@
|
|||
id: d6_system_theme
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- admin_theme
|
||||
- theme_default
|
||||
process:
|
||||
admin: admin_theme
|
||||
default: theme_default
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: system.theme
|
|
@ -0,0 +1,12 @@
|
|||
id: d6_taxonomy_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- taxonomy_override_selector
|
||||
- taxonomy_terms_per_page_admin
|
||||
process:
|
||||
override_selector: taxonomy_override_selector
|
||||
terms_per_page_admin: taxonomy_terms_per_page_admin
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: taxonomy.settings
|
|
@ -0,0 +1,10 @@
|
|||
id: d6_text_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- teaser_length
|
||||
process:
|
||||
default_summary_length: teaser_length
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: text.settings
|
|
@ -0,0 +1,16 @@
|
|||
id: d6_update_settings
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- update_max_fetch_attempts
|
||||
- update_fetch_url
|
||||
- update_notification_threshold
|
||||
- update_notify_emails
|
||||
process:
|
||||
'fetch:max_attempts': update_max_fetch_attempts
|
||||
'fetch:url': update_fetch_url
|
||||
'notification:threshold': update_notification_threshold
|
||||
'notification:mails': update_notify_emails
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: update.settings
|
|
@ -0,0 +1,36 @@
|
|||
id: d6_user_mail
|
||||
source:
|
||||
plugin: drupal6_variable
|
||||
variables:
|
||||
- user_mail_status_activated_subject
|
||||
- user_mail_status_activated_body
|
||||
- user_mail_password_reset_subject
|
||||
- user_mail_password_reset_body
|
||||
- user_mail_status_deleted_subject
|
||||
- user_mail_status_deleted_body
|
||||
- user_mail_register_admin_created_subject
|
||||
- user_mail_register_admin_created_body
|
||||
- user_mail_register_no_approval_required_subject
|
||||
- user_mail_register_no_approval_required_body
|
||||
- user_mail_user_mail_register_pending_approval_subject
|
||||
- user_mail_user_mail_register_pending_approval_body
|
||||
- user_mail_status_blocked_subject
|
||||
- user_mail_status_blocked_body
|
||||
process:
|
||||
'status_activated:subject': user_mail_status_activated_subject
|
||||
'status_activated:body': user_mail_status_activated_body
|
||||
'password_reset:subject': user_mail_password_reset_subject
|
||||
'password_reset:body': user_mail_password_reset_body
|
||||
'cancel_confirm:subject': user_mail_status_deleted_subject
|
||||
'cancel_confirm:body': user_mail_status_deleted_body
|
||||
'register_admin_created:subject': user_mail_register_admin_created_subject
|
||||
'register_admin_created:body': user_mail_register_admin_created_body
|
||||
'register_no_approval_required:subject': user_mail_register_no_approval_required_subject
|
||||
'register_no_approval_required:body': user_mail_register_no_approval_required_body
|
||||
'register_pending_approval:subject': user_mail_user_mail_register_pending_approval_subject
|
||||
'register_pending_approval:body': user_mail_user_mail_register_pending_approval_body
|
||||
'status_blocked:subject': user_mail_status_blocked_subject
|
||||
'status_blocked:body': user_mail_status_blocked_body
|
||||
destination:
|
||||
plugin: d8_config
|
||||
config_name: user.mail
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6ActionSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing action.settings.yml migration.
|
||||
*/
|
||||
class Drupal6ActionSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'actions_max_stack',
|
||||
'value' => 'i:35;',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6AggregatorSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing aggregator.settings.yml migration.
|
||||
*/
|
||||
class Drupal6AggregatorSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'aggregator_fetcher',
|
||||
'value' => 's:10:"aggregator";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'aggregator_parser',
|
||||
'value' => 's:10:"aggregator";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'aggregator_processors',
|
||||
'value' => 'a:1:{i:0;s:10:"aggregator";}',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'aggregator_allowed_html_tags',
|
||||
'value' => 's:70:"<a> <b> <br /> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'aggregator_teaser_length',
|
||||
'value' => 's:3:"600";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'aggregator_clear',
|
||||
'value' => 's:7:"9676800";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'aggregator_summary_items',
|
||||
'value' => 's:1:"3";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'aggregator_category_selector',
|
||||
'value' => 's:10:"checkboxes";',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6BookSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing book.settings.yml migration.
|
||||
*/
|
||||
class Drupal6BookSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'book_allowed_types',
|
||||
'value' => 'a:1:{i:0;s:4:"book";}',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'book_block_mode',
|
||||
'value' => 's:9:"all pages";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'book_child_type',
|
||||
'value' => 's:4:"book";',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6ContactSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing contact.settings.yml migration.
|
||||
*/
|
||||
class Drupal6ContactSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'contact_default_status',
|
||||
'value' => 'i:1;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'contact_hourly_threshold',
|
||||
'value' => 'i:3;',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6DblogSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing dblog.settings.yml migration.
|
||||
*/
|
||||
class Drupal6DblogSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'dblog_row_limit',
|
||||
'value' => 'i:1000;',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6DumpBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
class Drupal6DumpCommon {
|
||||
|
||||
public static function createVariable(Connection $database) {
|
||||
$database->schema()->createTable('variable', array(
|
||||
'fields' => array(
|
||||
'name' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 128,
|
||||
'not null' => TRUE,
|
||||
'default' => '',
|
||||
),
|
||||
'value' => array(
|
||||
'type' => 'blob',
|
||||
'not null' => TRUE,
|
||||
'size' => 'big',
|
||||
'translatable' => TRUE,
|
||||
),
|
||||
),
|
||||
'primary key' => array(
|
||||
'name',
|
||||
),
|
||||
'module' => 'book',
|
||||
'name' => 'variable',
|
||||
));
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6FieldSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing field.settings.yml migration.
|
||||
*/
|
||||
class Drupal6FieldSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'field_language_fallback',
|
||||
'value' => 'b:1;',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6FileSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing file.settings.yml migration.
|
||||
*/
|
||||
class Drupal6FileSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'file_description_type',
|
||||
'value' => 's:9:"textfield";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'file_description_length',
|
||||
'value' => 'i:128;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'file_icon_directory',
|
||||
'value' => 's:25:"sites/default/files/icons";',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6ForumSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing forum.site.yml migration.
|
||||
*/
|
||||
class Drupal6ForumSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'forum_hot_topic',
|
||||
'value' => 's:2:"15";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'forum_per_page',
|
||||
'value' => 's:2:"25";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'forum_order',
|
||||
'value' => 's:1:"1";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'forum_nav_vocabulary',
|
||||
'value' => 's:1:"1";',
|
||||
))
|
||||
// 'forum_block_num_active' in D8.
|
||||
->values(array(
|
||||
'name' => 'forum_block_num_0',
|
||||
'value' => 's:1:"5";',
|
||||
))
|
||||
// 'forum_block_num_new' in D8.
|
||||
->values(array(
|
||||
'name' => 'forum_block_num_1',
|
||||
'value' => 's:1:"5";',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6LocaleSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing locale.settings.yml migration.
|
||||
*/
|
||||
class Drupal6LocaleSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'locale_cache_strings',
|
||||
'value' => 'i:1;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'locale_js_directory',
|
||||
'value' => 's:9:"languages";',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6MenuSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing menu.settings.yml migration.
|
||||
*/
|
||||
class Drupal6MenuSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'menu_primary_links_source',
|
||||
'value' => 's:13:"primary-links";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'menu_secondary_links_source',
|
||||
'value' => 's:15:"secondary-links";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'menu_override_parent_selector',
|
||||
'value' => 'b:0;',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6NodeSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing node.settings.yml migration.
|
||||
*/
|
||||
class Drupal6NodeSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'node_admin_theme',
|
||||
'value' => 'i:0;',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate\Tests\Drupal6SearchSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing forum.site.yml migration.
|
||||
*/
|
||||
class Drupal6SearchSettings {
|
||||
|
||||
/**
|
||||
* Mock the database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The mocked database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'minimum_word_size',
|
||||
'value' => 's:1:"3";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'overlap_cjk',
|
||||
'value' => 'i:1;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'search_cron_limit',
|
||||
'value' => 's:3:"100";',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6SimpletestSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing simpletest.settings.yml migration.
|
||||
*/
|
||||
class Drupal6SimpletestSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'simpletest_clear_results',
|
||||
'value' => 'b:1;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'simpletest_httpauth_method',
|
||||
'value' => 'i:1;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'simpletest_httpauth_password',
|
||||
'value' => 'N;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'simpletest_httpauth_username',
|
||||
'value' => 'N;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'simpletest_verbose',
|
||||
'value' => 'b:1;',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6StatisticsSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing statistics.settings.yml migration.
|
||||
*/
|
||||
class Drupal6StatisticsSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'statistics_enable_access_log',
|
||||
'value' => 'i:0;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'statistics_flush_accesslog_timer',
|
||||
'value' => 'i:259200;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'statistics_count_content_view',
|
||||
'value' => 'i:0;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'statistics_block_top_day_num',
|
||||
'value' => 'i:0;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'statistics_block_top_all_num',
|
||||
'value' => 'i:0;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'statistics_block_top_last_num',
|
||||
'value' => 'i:0;',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6SyslogSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing syslog.settings.yml migration.
|
||||
*/
|
||||
class Drupal6SyslogSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'syslog_facility',
|
||||
'value' => 'i:128;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'syslog_identity',
|
||||
'value' => 's:6:"drupal";',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate\Tests\Drupal6SystemCron.
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6SystemCron.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
@ -21,27 +21,7 @@ class Drupal6SystemCron {
|
|||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
$database->schema()->createTable('variable', array(
|
||||
'fields' => array(
|
||||
'name' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 128,
|
||||
'not null' => TRUE,
|
||||
'default' => '',
|
||||
),
|
||||
'value' => array(
|
||||
'type' => 'blob',
|
||||
'not null' => TRUE,
|
||||
'size' => 'big',
|
||||
'translatable' => TRUE,
|
||||
),
|
||||
),
|
||||
'primary key' => array(
|
||||
'name',
|
||||
),
|
||||
'module' => 'system',
|
||||
'name' => 'variable',
|
||||
));
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6SystemFile.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing system.file.yml migration.
|
||||
*/
|
||||
class Drupal6SystemFile {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'file_directory_path',
|
||||
'value' => 's:10:"files/test";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'file_directory_temp',
|
||||
'value' => 's:10:"files/temp";',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6SystemFilter.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing system.filter.yml migration.
|
||||
*/
|
||||
class Drupal6SystemFilter {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'filter_allowed_protocols',
|
||||
'value' => 'a:13:{i:0;s:4:"http";i:1;s:5:"https";i:2;s:3:"ftp";i:3;s:4:"news";i:4;s:4:"nntp";i:5;s:3:"tel";i:6;s:6:"telnet";i:7;s:6:"mailto";i:8;s:3:"irc";i:9;s:3:"ssh";i:10;s:4:"sftp";i:11;s:6:"webcal";i:12;s:4:"rtsp";}',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6SystemImage.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing system.image.yml migration.
|
||||
*/
|
||||
class Drupal6SystemImage {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'image_toolkit',
|
||||
'value' => 's:2:"gd";',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6SystemImageGd.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing system.image.gd.yml migration.
|
||||
*/
|
||||
class Drupal6SystemImageGd {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'image_jpeg_quality',
|
||||
'value' => 'i:75;',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6SystemMaintenance.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing system.maintenance.yml migration.
|
||||
*/
|
||||
class Drupal6SystemMaintenance {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'site_offline',
|
||||
'value' => 'i:0;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'site_offline_message',
|
||||
'value' => 's:94:"Drupal is currently under maintenance. We should be back shortly. Thank you for your patience.";',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate\Tests\Drupal6SystemPerformance.
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6SystemPerformance.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
@ -21,27 +21,7 @@ class Drupal6SystemPerformance {
|
|||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
$database->schema()->createTable('variable', array(
|
||||
'fields' => array(
|
||||
'name' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 128,
|
||||
'not null' => TRUE,
|
||||
'default' => '',
|
||||
),
|
||||
'value' => array(
|
||||
'type' => 'blob',
|
||||
'not null' => TRUE,
|
||||
'size' => 'big',
|
||||
'translatable' => TRUE,
|
||||
),
|
||||
),
|
||||
'primary key' => array(
|
||||
'name',
|
||||
),
|
||||
'module' => 'system',
|
||||
'name' => 'variable',
|
||||
));
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate\Tests\Drupal6SystemRss.
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6SystemRss.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
@ -21,27 +21,7 @@ class Drupal6SystemRss {
|
|||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
$database->schema()->createTable('variable', array(
|
||||
'fields' => array(
|
||||
'name' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 128,
|
||||
'not null' => TRUE,
|
||||
'default' => '',
|
||||
),
|
||||
'value' => array(
|
||||
'type' => 'blob',
|
||||
'not null' => TRUE,
|
||||
'size' => 'big',
|
||||
'translatable' => TRUE,
|
||||
),
|
||||
),
|
||||
'primary key' => array(
|
||||
'name',
|
||||
),
|
||||
'module' => 'system',
|
||||
'name' => 'variable',
|
||||
));
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6SystemSite.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
@ -10,41 +15,24 @@ use Drupal\Core\Database\Connection;
|
|||
class Drupal6SystemSite {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
$database->schema()->createTable('variable', array(
|
||||
'fields' => array(
|
||||
'name' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 128,
|
||||
'not null' => TRUE,
|
||||
'default' => '',
|
||||
),
|
||||
'value' => array(
|
||||
'type' => 'blob',
|
||||
'not null' => TRUE,
|
||||
'size' => 'big',
|
||||
'translatable' => TRUE,
|
||||
),
|
||||
),
|
||||
'primary key' => array(
|
||||
'name',
|
||||
),
|
||||
'module' => 'system',
|
||||
'name' => 'variable',
|
||||
));
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'site_name',
|
||||
'value' => 's:6:"drupal";',
|
||||
'value' => 's:9:"site_name";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'site_mail',
|
||||
'value' => 's:17:"admin@example.com";',
|
||||
'value' => 's:21:"site_mail@example.com";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'site_slogan',
|
||||
|
@ -52,7 +40,7 @@ class Drupal6SystemSite {
|
|||
))
|
||||
->values(array(
|
||||
'name' => 'site_frontpage',
|
||||
'value' => 's:12:"anonymous-hp";',
|
||||
'value' => 's:4:"node";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'site_403',
|
||||
|
@ -62,10 +50,6 @@ class Drupal6SystemSite {
|
|||
'name' => 'site_404',
|
||||
'value' => 's:14:"page-not-found";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'drupal_weight_select_max',
|
||||
'value' => 'i:99;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'admin_compact_mode',
|
||||
'value' => 'b:0;',
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6SystemTheme.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing system.theme.yml migration.
|
||||
*/
|
||||
class Drupal6SystemTheme {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'admin_theme',
|
||||
'value' => 'i:0;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'theme_default',
|
||||
'value' => 's:7:"garland";',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6TaxonomySettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing taxonomy.settings.yml migration.
|
||||
*/
|
||||
class Drupal6TaxonomySettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'taxonomy_override_selector',
|
||||
'value' => 'b:0;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'taxonomy_terms_per_page_admin',
|
||||
'value' => 'i:100;',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6TextSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing text.settings.yml migration.
|
||||
*/
|
||||
class Drupal6TextSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'teaser_length',
|
||||
'value' => 'i:600;',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6UpdateSettings.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing update.settings.yml migration.
|
||||
*/
|
||||
class Drupal6UpdateSettings {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'update_max_fetch_attempts',
|
||||
'value' => 'i:2;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'update_fetch_url',
|
||||
'value' => 's:41:"http://updates.drupal.org/release-history";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'update_notification_threshold',
|
||||
'value' => 's:3:"all";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'update_notify_emails',
|
||||
'value' => 'a:0:{}',
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\Dump\Drupal6UserMail.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\Dump;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
|
||||
/**
|
||||
* Database dump for testing user.mail.yml migration.
|
||||
*/
|
||||
class Drupal6UserMail {
|
||||
|
||||
/**
|
||||
* Sample database schema and values.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
*/
|
||||
public static function load(Connection $database) {
|
||||
Drupal6DumpCommon::createVariable($database);
|
||||
$database->insert('variable')->fields(array(
|
||||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_status_activated_subject',
|
||||
'value' => 's:49:"Account details for !username at !site (approved)";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_status_activated_body',
|
||||
'value' => "s:419:\"!username,\n\nYour account at !site has been activated.\n\nYou may now log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\nOnce you have set your own password, you will be able to log in to !login_uri in the future using:\n\nusername: !username\n\";",
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_password_reset_subject',
|
||||
'value' => 's:52:"Replacement login information for !username at !site";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_password_reset_body',
|
||||
'value' => "s:409:\"!username,\n\nA request to reset the password for your account has been made at !site.\n\nYou may now log in to !uri_brief by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once. It expires after one day and nothing will happen if it's not used.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\";",
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_status_deleted_subject',
|
||||
'value' => 's:48:"Account details for !username at !site (deleted)";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_status_deleted_body',
|
||||
'value' => "s:51:\"!username,\n\nYour account on !site has been deleted.\";",
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_register_admin_created_subject',
|
||||
'value' => 's:52:"An administrator created an account for you at !site";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_register_admin_created_body',
|
||||
'value' => "s:452:\"!username,\n\nA site administrator at !site has created an account for you. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n-- !site team\";",
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_register_no_approval_required_subject',
|
||||
'value' => 's:38:"Account details for !username at !site";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_register_no_approval_required_body',
|
||||
'value' => "s:426:\"!username,\n\nThank you for registering at !site. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n-- !site team\";",
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_user_mail_register_pending_approval_subject',
|
||||
'value' => 's:63:"Account details for !username at !site (pending admin approval)";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_user_mail_register_pending_approval_body',
|
||||
'value' => "s:268:\"!username,\n\nThank you for registering at !site. Your application for an account is currently pending approval. Once it has been approved, you will receive another e-mail containing information about how to log in, set your password, and other details.\n\n\n-- !site team\";",
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_status_blocked_subject',
|
||||
'value' => 's:48:"Account details for !username at !site (blocked)";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_mail_status_blocked_body',
|
||||
'value' => "s:51:\"!username,\n\nYour account on !site has been blocked.\";",
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\system\Tests\Upgrade\MigrateSystemSiteTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
|
||||
class MigrateSystemConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to system.*.yml',
|
||||
'description' => 'Upgrade variables to system.*.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
function testSystemSite() {
|
||||
$migration = entity_load('migration', 'd6_system_site');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemSite.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$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('slogan'), 'Migrate rocks');
|
||||
$this->assertIdentical($config->get('page.front'), 'anonymous-hp');
|
||||
$this->assertIdentical($config->get('page.403'), 'user');
|
||||
$this->assertIdentical($config->get('page.404'), 'page-not-found');
|
||||
$this->assertIdentical($config->get('weight_select_max'), 99);
|
||||
$this->assertIdentical($config->get('admin_compact_mode'), FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of system (cron) variables to system.cron.yml.
|
||||
*/
|
||||
public function testSystemCron() {
|
||||
$migration = entity_load('migration', 'd6_system_cron');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemCron.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('system.cron');
|
||||
$this->assertIdentical($config->get('threshold.warning'), 172800);
|
||||
$this->assertIdentical($config->get('threshold.error'), 1209600);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of system (rss) variables to system.rss.yml.
|
||||
*/
|
||||
public function testSystemRss() {
|
||||
$migration = entity_load('migration', 'd6_system_rss');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemRss.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('system.rss');
|
||||
$this->assertIdentical($config->get('items.limit'), 10);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of system (Performance) variables to system.performance.yml.
|
||||
*/
|
||||
public function testSystemPerformance() {
|
||||
$migration = entity_load('migration', 'd6_system_performance');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemPerformance.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('system.performance');
|
||||
$this->assertIdentical($config->get('css.preprocess'), FALSE);
|
||||
$this->assertIdentical($config->get('js.preprocess'), FALSE);
|
||||
$this->assertIdentical($config->get('cache.page.max_age'), 0);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateActionConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the Action module.
|
||||
*/
|
||||
class MigrateActionConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to action.settings.yml',
|
||||
'description' => 'Upgrade variables to action.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of action variables to action.settings.yml.
|
||||
*/
|
||||
public function testActionSettings() {
|
||||
$migration = entity_load('migration', 'd6_action_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6ActionSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('action.settings');
|
||||
$this->assertIdentical($config->get('recursion_limit'), 35);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateAggregatorConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the Aggregator module.
|
||||
*/
|
||||
class MigrateAggregatorConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to aggregator.settings.yml',
|
||||
'description' => 'Upgrade variables to aggregator.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of aggregator variables to aggregator.settings.yml.
|
||||
*/
|
||||
public function testAggregatorSettings() {
|
||||
$migration = entity_load('migration', 'd6_aggregator_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6AggregatorSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('aggregator.settings');
|
||||
$this->assertIdentical($config->get('fetcher'), 'aggregator');
|
||||
$this->assertIdentical($config->get('parser'), 'aggregator');
|
||||
$this->assertIdentical($config->get('processors'), array('aggregator'));
|
||||
$this->assertIdentical($config->get('items.teaser_length'), 600);
|
||||
$this->assertIdentical($config->get('items.allowed_html'), '<a> <b> <br /> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>');
|
||||
$this->assertIdentical($config->get('items.expire'), 9676800);
|
||||
$this->assertIdentical($config->get('source.list_max'), 3);
|
||||
$this->assertIdentical($config->get('source.category_selector'), 'checkboxes');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateBookConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the Book module.
|
||||
*/
|
||||
class MigrateBookConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to book.settings.yml',
|
||||
'description' => 'Upgrade variables to book.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of book variables to book.settings.yml.
|
||||
*/
|
||||
public function testBookSettings() {
|
||||
$migration = entity_load('migration', 'd6_book_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6BookSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('book.settings');
|
||||
$this->assertIdentical($config->get('child_type'), 'book');
|
||||
$this->assertIdentical($config->get('block.navigation.mode'), 'all pages');
|
||||
$this->assertIdentical($config->get('allowed_types'), array('book'));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateContactConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the Contact module.
|
||||
*/
|
||||
class MigrateContactConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to contact.settings',
|
||||
'description' => 'Upgrade variables to contact.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of aggregator variables to aggregator.settings.yml.
|
||||
*/
|
||||
public function testContactSettings() {
|
||||
$migration = entity_load('migration', 'd6_contact_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6ContactSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('contact.settings');
|
||||
$this->assertIdentical($config->get('user_default_enabled'), true);
|
||||
$this->assertIdentical($config->get('flood.limit'), 3);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateDblogConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the dblog module.
|
||||
*/
|
||||
class MigrateDblogConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to dblog.settings.yml',
|
||||
'description' => 'Upgrade variables to dblog.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of dblog variables to dblog.settings.yml.
|
||||
*/
|
||||
public function testBookSettings() {
|
||||
$migration = entity_load('migration', 'd6_dblog_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6DblogSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('dblog.settings');
|
||||
$this->assertIdentical($config->get('row_limit'), 1000);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateFieldConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the Field module.
|
||||
*/
|
||||
class MigrateFieldConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to field.settings.yml',
|
||||
'description' => 'Upgrade variables to field.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of field variables to field.settings.yml.
|
||||
*/
|
||||
public function testFieldSettings() {
|
||||
$migration = entity_load('migration', 'd6_field_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6FieldSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('field.settings');
|
||||
$this->assertIdentical($config->get('language_fallback'), TRUE);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateFileConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the File module.
|
||||
*/
|
||||
class MigrateFileConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to file.settings.yml',
|
||||
'description' => 'Upgrade variables to file.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of file variables to file.settings.yml.
|
||||
*/
|
||||
public function testFileSettings() {
|
||||
$migration = entity_load('migration', 'd6_file_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6FileSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('file.settings');
|
||||
$this->assertIdentical($config->get('description.type'), 'textfield');
|
||||
$this->assertIdentical($config->get('description.length'), 128);
|
||||
$this->assertIdentical($config->get('icon.directory'), 'sites/default/files/icons');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateForumConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables for the Forum module.
|
||||
*/
|
||||
class MigrateForumConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to forum.settings.yml',
|
||||
'description' => 'Upgrade variables to forum.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of forum variables to forum.settings.yml.
|
||||
*/
|
||||
public function testForumSettings() {
|
||||
$migration = entity_load('migration', 'd6_forum_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6ForumSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('forum.settings');
|
||||
$this->assertIdentical($config->get('topics.hot_threshold'), 15);
|
||||
$this->assertIdentical($config->get('topics.page_limit'), 25);
|
||||
$this->assertIdentical($config->get('topics.order'), 1);
|
||||
// The vocabulary vid depends on existing vids when the Forum module was enabled. This would have to be user-selectable based on a query to the D6 vocabulary table.
|
||||
//$this->assertIdentical($config->get('forum_nav_vocabulary'), '1');
|
||||
// This is 'forum_block_num_0' in D6, but block:active:limit' in D8.
|
||||
$this->assertIdentical($config->get('block.active.limit'), 5);
|
||||
// This is 'forum_block_num_1' in D6, but 'block:new:limit' in D8.
|
||||
$this->assertIdentical($config->get('block.new.limit'), 5);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateLocaleConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the Locale module.
|
||||
*/
|
||||
class MigrateLocaleConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to locale.settings.yml',
|
||||
'description' => 'Upgrade variables to locale.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of locale variables to locale.settings.yml.
|
||||
*/
|
||||
public function testLocaleSettings() {
|
||||
$migration = entity_load('migration', 'd6_locale_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6LocaleSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('locale.settings');
|
||||
$this->assertIdentical($config->get('cache_string'), 1);
|
||||
$this->assertIdentical($config->get('javascript.directory'), 'languages');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateMenuConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables for the Menu module.
|
||||
*/
|
||||
class MigrateMenuConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to menu.settings.yml',
|
||||
'description' => 'Upgrade variables to menu.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of forum variables to forum.settings.yml.
|
||||
*/
|
||||
public function testMenuSettings() {
|
||||
$migration = entity_load('migration', 'd6_menu_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6MenuSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('menu.settings');
|
||||
$this->assertIdentical($config->get('main_links'), 'primary-links');
|
||||
$this->assertIdentical($config->get('secondary_links'), 'secondary-links');
|
||||
$this->assertIdentical($config->get('override_parent_selector'), FALSE);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateSystemSiteTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
class MigrateNodeConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to node.settings.yml',
|
||||
'description' => 'Upgrade variables to node.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
function testNodeSettings() {
|
||||
$migration = entity_load('migration', 'd6_node_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6NodeSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage);
|
||||
$executable->import();
|
||||
$config = \Drupal::config('node.settings');
|
||||
$this->assertIdentical($config->get('use_admin_theme'), false);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateSearchConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables for the Search module.
|
||||
*/
|
||||
class MigrateSearchConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to search.settings.yml',
|
||||
'description' => 'Upgrade variables to search.settings.yml',
|
||||
'group' => 'Migrate',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of search variables to search.settings.yml.
|
||||
*/
|
||||
public function testSearchSettings() {
|
||||
$migration = entity_load('migration', 'd6_search_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SearchSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('search.settings');
|
||||
$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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateSimpletestConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the Simpletest module.
|
||||
*/
|
||||
class MigrateSimpletestConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to simpletest.settings.yml',
|
||||
'description' => 'Upgrade variables to simpletest.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of simpletest variables to simpletest.settings.yml.
|
||||
*/
|
||||
public function testSimpletestSettings() {
|
||||
$migration = entity_load('migration', 'd6_simpletest_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SimpletestSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('simpletest.settings');
|
||||
$this->assertIdentical($config->get('clear_results'), TRUE);
|
||||
$this->assertIdentical($config->get('httpauth.method'), CURLAUTH_BASIC);
|
||||
$this->assertIdentical($config->get('httpauth.password'), NULL);
|
||||
$this->assertIdentical($config->get('httpauth.username'), NULL);
|
||||
$this->assertIdentical($config->get('verbose'), TRUE);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateStatisticsConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the Statistics module.
|
||||
*/
|
||||
class MigrateStatisticsConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to statistics.settings.yml',
|
||||
'description' => 'Upgrade variables to statistics.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of statistics variables to statistics.settings.yml.
|
||||
*/
|
||||
public function testStatisticsSettings() {
|
||||
$migration = entity_load('migration', 'd6_statistics_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6StatisticsSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('statistics.settings');
|
||||
$this->assertIdentical($config->get('access_log.enable'), 0);
|
||||
$this->assertIdentical($config->get('access_log.max_lifetime'), 259200);
|
||||
$this->assertIdentical($config->get('count_content_views'), NULL);
|
||||
$this->assertIdentical($config->get('block.popular.top_day_limit'), 0);
|
||||
$this->assertIdentical($config->get('block.popular.top_all_limit'), 0);
|
||||
$this->assertIdentical($config->get('block.popular.top_recent_limit'), 0);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateSyslogConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the Syslog module.
|
||||
*/
|
||||
class MigrateSyslogConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to syslog.settings.yml',
|
||||
'description' => 'Upgrade variables to syslog.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of syslog variables to syslog.settings.yml.
|
||||
*/
|
||||
public function testSyslogSettings() {
|
||||
$migration = entity_load('migration', 'd6_syslog_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SyslogSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('syslog.settings');
|
||||
$this->assertIdentical($config->get('identity'), 'drupal');
|
||||
// @TODO: change this to integer once there's schema of this config.
|
||||
$this->assertIdentical($config->get('facility'), '128');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,191 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateSystemSiteTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
class MigrateSystemConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to system.*.yml',
|
||||
'description' => 'Upgrade variables to system.*.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of system (cron) variables to system.cron.yml.
|
||||
*/
|
||||
public function testSystemCron() {
|
||||
$migration = entity_load('migration', 'd6_system_cron');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemCron.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('system.cron');
|
||||
$this->assertIdentical($config->get('threshold.warning'), 172800);
|
||||
$this->assertIdentical($config->get('threshold.error'), 1209600);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of system (rss) variables to system.rss.yml.
|
||||
*/
|
||||
public function testSystemRss() {
|
||||
$migration = entity_load('migration', 'd6_system_rss');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemRss.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('system.rss');
|
||||
$this->assertIdentical($config->get('items.limit'), 10);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of system (Performance) variables to system.performance.yml.
|
||||
*/
|
||||
public function testSystemPerformance() {
|
||||
$migration = entity_load('migration', 'd6_system_performance');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemPerformance.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('system.performance');
|
||||
$this->assertIdentical($config->get('css.preprocess'), false);
|
||||
$this->assertIdentical($config->get('js.preprocess'), false);
|
||||
$this->assertIdentical($config->get('cache.page.max_age'), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of system (theme) variables to system.theme.yml.
|
||||
*/
|
||||
public function testSystemTheme() {
|
||||
$migration = entity_load('migration', 'd6_system_theme');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemTheme.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('system.theme');
|
||||
$this->assertIdentical($config->get('admin'), '0');
|
||||
$this->assertIdentical($config->get('default'), 'garland');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of system (maintenance) variables to system.maintenance.yml.
|
||||
*/
|
||||
public function testSystemMaintenance() {
|
||||
$migration = entity_load('migration', 'd6_system_maintenance');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemMaintenance.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('system.maintenance');
|
||||
$this->assertIdentical($config->get('enable'), 0);
|
||||
$this->assertIdentical($config->get('message'), 'Drupal is currently under maintenance. We should be back shortly. Thank you for your patience.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of system (site) variables to system.site.yml.
|
||||
*/
|
||||
public function testSystemSite() {
|
||||
$migration = entity_load('migration', 'd6_system_site');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemSite.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('system.site');
|
||||
$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'), 'node');
|
||||
$this->assertIdentical($config->get('admin_compact_mode'), FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of system (filter) variables to system.filter.yml.
|
||||
*/
|
||||
public function testSystemFilter() {
|
||||
$migration = entity_load('migration', 'd6_system_filter');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemFilter.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('system.filter');
|
||||
$this->assertIdentical($config->get('protocols'), array('http', 'https', 'ftp', 'news', 'nntp', 'tel', 'telnet', 'mailto', 'irc', 'ssh', 'sftp', 'webcal', 'rtsp'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of system (image) variables to system.image.yml.
|
||||
*/
|
||||
public function testSystemImage() {
|
||||
$migration = entity_load('migration', 'd6_system_image');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemImage.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('system.image');
|
||||
$this->assertIdentical($config->get('toolkit'), 'gd');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of system (image GD) variables to system.image.gd.yml.
|
||||
*/
|
||||
public function testSystemImageGd() {
|
||||
$migration = entity_load('migration', 'd6_system_image_gd');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemImageGd.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('system.image.gd');
|
||||
$this->assertIdentical($config->get('jpeg_quality'), 75);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of system (file) variables to system.file.yml.
|
||||
*/
|
||||
public function testSystemFile() {
|
||||
$migration = entity_load('migration', 'd6_system_file');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6SystemFile.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
config_context_enter('config.context.free');
|
||||
$config = \Drupal::config('system.file');
|
||||
$this->assertIdentical($config->get('path.private'), 'files/test');
|
||||
$this->assertIdentical($config->get('path.temporary'), 'files/temp');
|
||||
config_context_leave();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateTaxonomyConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the Taxonomy module.
|
||||
*/
|
||||
class MigrateTaxonomyConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to taxonomy.settings.yml',
|
||||
'description' => 'Upgrade variables to taxonomy.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of taxonomy variables to taxonomy.settings.yml.
|
||||
*/
|
||||
public function testTaxonomySettings() {
|
||||
$migration = entity_load('migration', 'd6_taxonomy_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6TaxonomySettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('taxonomy.settings');
|
||||
$this->assertIdentical($config->get('terms_per_page_admin'), 100);
|
||||
$this->assertIdentical($config->get('override_selector'), FALSE);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateTextConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the Text module.
|
||||
*/
|
||||
class MigrateTextConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to text.settings.yml',
|
||||
'description' => 'Upgrade variables to text.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of text variables to text.settings.yml.
|
||||
*/
|
||||
public function testTextSettings() {
|
||||
$migration = entity_load('migration', 'd6_text_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6TextSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('text.settings');
|
||||
$this->assertIdentical($config->get('default_summary_length'), 600);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUpdateConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the Update module.
|
||||
*/
|
||||
class MigrateUpdateConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to update.settings.yml',
|
||||
'description' => 'Upgrade variables to update.settings.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of update variables to update.settings.yml.
|
||||
*/
|
||||
public function testUpdateSettings() {
|
||||
$migration = entity_load('migration', 'd6_update_settings');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6UpdateSettings.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('update.settings');
|
||||
$this->assertIdentical($config->get('fetch.max_attempts'), 2);
|
||||
$this->assertIdentical($config->get('fetch.url'), 'http://updates.drupal.org/release-history');
|
||||
$this->assertIdentical($config->get('notification.threshold'), 'all');
|
||||
$this->assertIdentical($config->get('notification.mails'), array());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserConfigsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\migrate_drupal\Tests\d6;
|
||||
|
||||
use Drupal\migrate\MigrateMessage;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
|
||||
|
||||
/**
|
||||
* Tests migration of variables from the User module.
|
||||
*/
|
||||
class MigrateUserConfigsTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
'name' => 'Migrate variables to user.*.yml',
|
||||
'description' => 'Upgrade variables to user.*.yml',
|
||||
'group' => 'Migrate Drupal',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests migration of user variables to user.mail.yml.
|
||||
*/
|
||||
public function testUserMail() {
|
||||
$migration = entity_load('migration', 'd6_user_mail');
|
||||
$dumps = array(
|
||||
drupal_get_path('module', 'migrate_drupal') . '/lib/Drupal/migrate_drupal/Tests/Dump/Drupal6UserMail.php',
|
||||
);
|
||||
$this->prepare($migration, $dumps);
|
||||
$executable = new MigrateExecutable($migration, new MigrateMessage());
|
||||
$executable->import();
|
||||
$config = \Drupal::config('user.mail');
|
||||
$this->assertIdentical($config->get('status_activated.subject'), 'Account details for !username at !site (approved)');
|
||||
$this->assertIdentical($config->get('status_activated.body'), "!username,\n\nYour account at !site has been activated.\n\nYou may now log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\nOnce you have set your own password, you will be able to log in to !login_uri in the future using:\n\nusername: !username\n");
|
||||
$this->assertIdentical($config->get('password_reset.subject'), 'Replacement login information for !username at !site');
|
||||
$this->assertIdentical($config->get('password_reset.body'), "!username,\n\nA request to reset the password for your account has been made at !site.\n\nYou may now log in to !uri_brief by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once. It expires after one day and nothing will happen if it's not used.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.");
|
||||
$this->assertIdentical($config->get('cancel_confirm.subject'), 'Account details for !username at !site (deleted)');
|
||||
$this->assertIdentical($config->get('cancel_confirm.body'), "!username,\n\nYour account on !site has been deleted.");
|
||||
$this->assertIdentical($config->get('register_admin_created.subject'), 'An administrator created an account for you at !site');
|
||||
$this->assertIdentical($config->get('register_admin_created.body'), "!username,\n\nA site administrator at !site has created an account for you. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n-- !site team");
|
||||
$this->assertIdentical($config->get('register_no_approval_required.subject'), 'Account details for !username at !site');
|
||||
$this->assertIdentical($config->get('register_no_approval_required.body'), "!username,\n\nThank you for registering at !site. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n-- !site team");
|
||||
$this->assertIdentical($config->get('register_pending_approval.subject'), 'Account details for !username at !site (pending admin approval)');
|
||||
$this->assertIdentical($config->get('register_pending_approval.body'), "!username,\n\nThank you for registering at !site. Your application for an account is currently pending approval. Once it has been approved, you will receive another e-mail containing information about how to log in, set your password, and other details.\n\n\n-- !site team");
|
||||
$this->assertIdentical($config->get('status_blocked.subject'), 'Account details for !username at !site (blocked)');
|
||||
$this->assertIdentical($config->get('status_blocked.body'), "!username,\n\nYour account on !site has been blocked.");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue