Update to Drupal 8.2.0. For more information, see https://www.drupal.org/project/drupal/releases/8.2.0
This commit is contained in:
parent
2f563ab520
commit
f1c8716f57
1732 changed files with 52334 additions and 11780 deletions
|
@ -3738,6 +3738,15 @@ $connection->insert('field_config_instance')
|
|||
'data' => 'a:7:{s:5:"label";s:7:"Integer";s:6:"widget";a:5:{s:6:"weight";s:1:"2";s:4:"type";s:6:"number";s:6:"module";s:6:"number";s:6:"active";i:0;s:8:"settings";a:0:{}}s:8:"settings";a:5:{s:3:"min";s:0:"";s:3:"max";s:0:"";s:6:"prefix";s:0:"";s:6:"suffix";s:0:"";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:14:"number_integer";s:8:"settings";a:4:{s:18:"thousand_separator";s:0:"";s:17:"decimal_separator";s:1:".";s:5:"scale";i:0;s:13:"prefix_suffix";b:1;}s:6:"module";s:6:"number";s:6:"weight";i:0;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}',
|
||||
'deleted' => '0',
|
||||
))
|
||||
->values(array(
|
||||
'id' => '36',
|
||||
'field_id' => '14',
|
||||
'field_name' => 'field_integer',
|
||||
'entity_type' => 'user',
|
||||
'bundle' => 'user',
|
||||
'data' => 'a:7:{s:5:"label";s:7:"Integer";s:6:"widget";a:5:{s:6:"weight";s:1:"9";s:4:"type";s:6:"number";s:6:"module";s:6:"number";s:6:"active";i:0;s:8:"settings";a:0:{}}s:8:"settings";a:5:{s:3:"min";s:1:"1";s:3:"max";s:2:"25";s:6:"prefix";s:3:"abc";s:6:"suffix";s:3:"xyz";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:14:"number_integer";s:6:"weight";s:1:"8";s:8:"settings";a:4:{s:18:"thousand_separator";s:1:" ";s:17:"decimal_separator";s:1:".";s:5:"scale";i:0;s:13:"prefix_suffix";b:1;}s:6:"module";s:6:"number";}}s:8:"required";i:1;s:11:"description";s:0:"";s:13:"default_value";N;}',
|
||||
'deleted' => '0',
|
||||
))
|
||||
->execute();
|
||||
|
||||
$connection->schema()->createTable('field_data_body', array(
|
||||
|
@ -4750,6 +4759,16 @@ $connection->insert('field_data_field_integer')
|
|||
'delta' => '0',
|
||||
'field_integer_value' => '5',
|
||||
))
|
||||
->values(array(
|
||||
'entity_type' => 'user',
|
||||
'bundle' => 'user',
|
||||
'deleted' => '0',
|
||||
'entity_id' => '2',
|
||||
'revision_id' => '2',
|
||||
'language' => 'und',
|
||||
'delta' => '0',
|
||||
'field_integer_value' => '99',
|
||||
))
|
||||
->execute();
|
||||
|
||||
$connection->schema()->createTable('field_data_field_integer_list', array(
|
||||
|
@ -6582,6 +6601,16 @@ $connection->insert('field_revision_field_integer')
|
|||
'delta' => '0',
|
||||
'field_integer_value' => '5',
|
||||
))
|
||||
->values(array(
|
||||
'entity_type' => 'user',
|
||||
'bundle' => 'user',
|
||||
'deleted' => '0',
|
||||
'entity_id' => '2',
|
||||
'revision_id' => '2',
|
||||
'language' => 'und',
|
||||
'delta' => '0',
|
||||
'field_integer_value' => '99',
|
||||
))
|
||||
->execute();
|
||||
|
||||
$connection->schema()->createTable('field_revision_field_integer_list', array(
|
||||
|
@ -41015,7 +41044,7 @@ $connection->insert('users')
|
|||
'login' => '0',
|
||||
'status' => '1',
|
||||
'timezone' => 'America/Chicago',
|
||||
'language' => '',
|
||||
'language' => 'en',
|
||||
'picture' => '0',
|
||||
'init' => 'odo@local.host',
|
||||
'data' => 'a:1:{s:7:"contact";i:1;}',
|
||||
|
@ -41082,6 +41111,10 @@ $connection->insert('variable')
|
|||
'name',
|
||||
'value',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'actions_max_stack',
|
||||
'value' => 'i:28;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'additional_settings__active_tab_article',
|
||||
'value' => 's:15:"edit-submission";',
|
||||
|
@ -41106,6 +41139,10 @@ $connection->insert('variable')
|
|||
'name' => 'additional_settings__active_tab_test_content_type',
|
||||
'value' => 's:13:"edit-workflow";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'admin_compact_mode',
|
||||
'value' => 'b:1;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'admin_theme',
|
||||
'value' => 's:5:"seven";',
|
||||
|
@ -41142,10 +41179,18 @@ $connection->insert('variable')
|
|||
'name' => 'allow_insecure_derivatives',
|
||||
'value' => 'b:1;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'allow_insecure_uploads',
|
||||
'value' => 'i:1;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'anonymous',
|
||||
'value' => 's:9:"Anonymous";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'authorize_filetransfer_default',
|
||||
'value' => 's:3:"ftp";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'block_cache',
|
||||
'value' => 'i:0;',
|
||||
|
@ -41158,6 +41203,10 @@ $connection->insert('variable')
|
|||
'name' => 'book_child_type',
|
||||
'value' => 's:4:"book";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'cache',
|
||||
'value' => 'i:0;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'cache_flush_cache',
|
||||
'value' => 'i:0;',
|
||||
|
@ -41370,6 +41419,10 @@ $connection->insert('variable')
|
|||
'name' => 'comment_test_content_type',
|
||||
'value' => 's:1:"2";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'configurable_timezones',
|
||||
'value' => 'b:1;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'contact_default_status',
|
||||
'value' => 'i:1;',
|
||||
|
@ -41390,6 +41443,14 @@ $connection->insert('variable')
|
|||
'name' => 'cron_last',
|
||||
'value' => 'i:1444944970;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'cron_threshold_error',
|
||||
'value' => 'i:1209600;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'cron_threshold_warning',
|
||||
'value' => 'i:172800;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'css_js_query_string',
|
||||
'value' => 's:6:"nwa6nq";',
|
||||
|
@ -41410,6 +41471,10 @@ $connection->insert('variable')
|
|||
'name' => 'date_default_timezone',
|
||||
'value' => 's:15:"America/Chicago";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'date_first_day',
|
||||
'value' => 'i:1;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'dblog_row_limit',
|
||||
'value' => 'i:10000;',
|
||||
|
@ -41430,10 +41495,30 @@ $connection->insert('variable')
|
|||
'name' => 'drupal_private_key',
|
||||
'value' => 's:43:"9eRJWxrMwQ5CufYJjXBZbPGz_t8vPIYRQr18PamdKmM";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'drupal_weight_select_max',
|
||||
'value' => 'i:40;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'email__active_tab',
|
||||
'value' => 's:27:"edit-email-pending-approval";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'empty_timezone_message',
|
||||
'value' => 'b:1;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'error_level',
|
||||
'value' => 'i:1;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'feed_default_items',
|
||||
'value' => 'i:27;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'feed_item_length',
|
||||
'value' => 's:8:"fulltext";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'field_bundle_settings_comment__comment_node_test_content_type',
|
||||
'value' => 'a:2:{s:10:"view_modes";a:0:{}s:12:"extra_fields";a:2:{s:4:"form";a:2:{s:6:"author";a:1:{s:6:"weight";s:2:"-2";}s:7:"subject";a:1:{s:6:"weight";s:2:"-1";}}s:7:"display";a:0:{}}}',
|
||||
|
@ -41450,6 +41535,22 @@ $connection->insert('variable')
|
|||
'name' => 'file_default_scheme',
|
||||
'value' => 's:6:"public";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'file_description_length',
|
||||
'value' => 'i:256;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'file_description_type',
|
||||
'value' => 's:9:"textfield";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'file_directory_path',
|
||||
'value' => 's:19:"sites/default/files";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'file_icon_directory',
|
||||
'value' => 's:25:"sites/default/files/icons";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'file_private_path',
|
||||
'value' => 's:0:"";',
|
||||
|
@ -41494,10 +41595,18 @@ $connection->insert('variable')
|
|||
'name' => 'forum_per_page',
|
||||
'value' => 'i:25;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'image_jpeg_quality',
|
||||
'value' => 'i:80;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'image_style_preview_image',
|
||||
'value' => 's:33:"core/modules/image/testsample.png";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'image_toolkit',
|
||||
'value' => 's:2:"gd";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'install_profile',
|
||||
'value' => 's:8:"standard";',
|
||||
|
@ -41574,6 +41683,10 @@ $connection->insert('variable')
|
|||
'name' => 'locale_language_negotiation_url_part',
|
||||
'value' => 's:6:"domain";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'mail_system',
|
||||
'value' => 'a:1:{s:14:"default-system";s:17:"DefaultMailSystem";}',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'maintenance_mode',
|
||||
'value' => 'i:0;',
|
||||
|
@ -41838,6 +41951,10 @@ $connection->insert('variable')
|
|||
'name' => 'site_name',
|
||||
'value' => 's:13:"The Site Name";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'site_offline_message',
|
||||
'value' => 's:42:"This is a custom maintenance mode message.";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'site_slogan',
|
||||
'value' => 's:10:"The Slogan";',
|
||||
|
@ -41878,6 +41995,14 @@ $connection->insert('variable')
|
|||
'name' => 'syslog_identity',
|
||||
'value' => 's:6:"drupal";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'taxonomy_override_selector',
|
||||
'value' => 'b:1;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'taxonomy_terms_per_page_admin',
|
||||
'value' => 'i:84;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'teaser_length',
|
||||
'value' => 'i:1024;',
|
||||
|
@ -41922,6 +42047,10 @@ $connection->insert('variable')
|
|||
'name' => 'user_cancel_method',
|
||||
'value' => 's:17:"user_cancel_block";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_default_timezone',
|
||||
'value' => 'i:2;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'user_email_verification',
|
||||
'value' => 'i:1;',
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\migrate_drupal\Unit\source;
|
||||
|
||||
use Drupal\Tests\migrate\Unit\MigrateTestCase;
|
||||
use Drupal\migrate\Exception\RequirementsException;
|
||||
|
||||
/**
|
||||
* @coversDefaultClass Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase
|
||||
* @group migrate_drupal
|
||||
*/
|
||||
class DrupalSqlBaseTest extends MigrateTestCase {
|
||||
|
||||
/**
|
||||
* Define bare minimum migration configuration.
|
||||
*/
|
||||
protected $migrationConfiguration = array(
|
||||
'id' => 'DrupalSqlBase',
|
||||
);
|
||||
|
||||
/**
|
||||
* @var \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase
|
||||
*/
|
||||
protected $base;
|
||||
|
||||
/**
|
||||
* Minimum database contents needed to test DrupalSqlBase.
|
||||
*/
|
||||
protected $databaseContents = array(
|
||||
'system' => array(
|
||||
array(
|
||||
'filename' => 'sites/all/modules/module1',
|
||||
'name' => 'module1',
|
||||
'type' => 'module',
|
||||
'status' => 0,
|
||||
'schema_version' => -1,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
* @covers ::checkRequirements
|
||||
*/
|
||||
public function testSourceProviderNotActive() {
|
||||
$plugin_definition['requirements_met'] = TRUE;
|
||||
$plugin_definition['source_provider'] = 'module1';
|
||||
/** @var \Drupal\Core\State\StateInterface $state */
|
||||
$state = $this->getMock('Drupal\Core\State\StateInterface');
|
||||
/** @var \Drupal\Core\Entity\EntityManagerInterface $entity_manager */
|
||||
$entity_manager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface');
|
||||
$plugin = new TestDrupalSqlBase([], 'placeholder_id', $plugin_definition, $this->getMigration(), $state, $entity_manager);
|
||||
$plugin->setDatabase($this->getDatabase($this->databaseContents));
|
||||
$system_data = $plugin->getSystemData();
|
||||
$this->setExpectedException(RequirementsException::class, 'The module module1 is not enabled in the source site.');
|
||||
try {
|
||||
$plugin->checkRequirements();
|
||||
}
|
||||
catch (RequirementsException $e) {
|
||||
// Ensure requirements are set on the exception.
|
||||
$this->assertEquals(['source_provider' => 'module1'], $e->getRequirements());
|
||||
// Re-throw so PHPUnit can assert the exception.
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace Drupal\Tests\migrate_drupal\Unit\source;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
|
||||
|
||||
/**
|
||||
* Extends the DrupalSqlBase abstract class.
|
||||
*/
|
||||
class TestDrupalSqlBase extends DrupalSqlBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function fields() {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function query() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tweaks DrupalSqlBase to set a new database connection for tests.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The new connection to use.
|
||||
*
|
||||
* @see \Drupal\Tests\migrate\Unit\MigrateSourceSqlTestCase
|
||||
*/
|
||||
public function setDatabase(Connection $database) {
|
||||
$this->database = $database;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getIds() {
|
||||
return [];
|
||||
}
|
||||
|
||||
}
|
|
@ -170,7 +170,7 @@ class TestDrupal6SqlBase extends DrupalSqlBase {
|
|||
/**
|
||||
* Tweaks Drupal6SqlBase to set a new database connection for tests.
|
||||
*
|
||||
* @param \Drupal\Core\Database\Connection
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The new connection to use.
|
||||
*
|
||||
* @see \Drupal\Tests\migrate\Unit\MigrateSqlTestCase
|
||||
|
@ -182,7 +182,7 @@ class TestDrupal6SqlBase extends DrupalSqlBase {
|
|||
/**
|
||||
* Tweaks Drupal6SqlBase to set a new module handler for tests.
|
||||
*
|
||||
* @param \Drupal\Core\Extension\ModuleHandlerInterface
|
||||
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
|
||||
* The new module handler to use.
|
||||
*
|
||||
* @see \Drupal\Tests\migrate\Unit\MigrateSqlTestCase
|
||||
|
|
Reference in a new issue