Core and composer updates

This commit is contained in:
Rob Davies 2017-07-03 16:47:07 +01:00
parent a82634bb98
commit 62cac30480
1118 changed files with 21770 additions and 6306 deletions

File diff suppressed because it is too large Load diff

View file

@ -42953,6 +42953,15 @@ $connection->insert('taxonomy_vocabulary')
'module' => 'taxonomy',
'weight' => '0',
))
->values(array(
'vid' => '4',
'name' => 'vocabulary name much longer than thirty two characters',
'machine_name' => 'vocabulary_name_much_longer_than_thirty_two_characters',
'description' => 'description of vocabulary name much longer than thirty two characters',
'hierarchy' => '1',
'module' => 'taxonomy',
'weight' => '0',
))
->execute();
$connection->schema()->createTable('tracker_node', array(
@ -44319,6 +44328,14 @@ $connection->insert('variable')
'name' => 'theme_settings',
'value' => 'a:16:{s:11:"toggle_logo";i:0;s:11:"toggle_name";i:1;s:13:"toggle_slogan";i:0;s:24:"toggle_node_user_picture";i:0;s:27:"toggle_comment_user_picture";i:0;s:32:"toggle_comment_user_verification";i:0;s:14:"toggle_favicon";i:0;s:16:"toggle_main_menu";i:0;s:21:"toggle_secondary_menu";i:0;s:12:"default_logo";i:1;s:9:"logo_path";s:23:"public://customlogo.png";s:11:"logo_upload";s:0:"";s:15:"default_favicon";i:0;s:12:"favicon_path";s:24:"public://somefavicon.png";s:14:"favicon_upload";s:0:"";s:16:"favicon_mimetype";s:9:"image/png";}',
))
->values(array(
'name' => 'theme_bartik_settings',
'value' => 'a:18:{s:11:"toggle_logo";i:1;s:11:"toggle_name";i:1;s:13:"toggle_slogan";i:1;s:24:"toggle_node_user_picture";i:1;s:27:"toggle_comment_user_picture";i:1;s:32:"toggle_comment_user_verification";i:1;s:14:"toggle_favicon";i:1;s:16:"toggle_main_menu";i:1;s:21:"toggle_secondary_menu";i:1;s:12:"default_logo";i:0;s:9:"logo_path";s:16:"public://gnu.png";s:15:"default_favicon";i:1;s:12:"favicon_path";s:0:"";s:14:"favicon_upload";s:0:"";s:6:"scheme";s:7:"default";s:7:"palette";a:9:{s:3:"top";s:7:"#0779bf";s:6:"bottom";s:7:"#48a9e4";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#f6f6f2";s:14:"sidebarborders";s:7:"#f9f9f9";s:6:"footer";s:7:"#292929";s:11:"titleslogan";s:7:"#fffeff";s:4:"text";s:7:"#3b3b3b";s:4:"link";s:7:"#0071B3";}s:5:"theme";s:6:"bartik";s:4:"info";a:12:{s:6:"fields";a:9:{s:3:"top";s:10:"Header top";s:6:"bottom";s:13:"Header bottom";s:2:"bg";s:15:"Main background";s:7:"sidebar";s:18:"Sidebar background";s:14:"sidebarborders";s:15:"Sidebar borders";s:6:"footer";s:17:"Footer background";s:11:"titleslogan";s:16:"Title and slogan";s:4:"text";s:10:"Text color";s:4:"link";s:10:"Link color";}s:7:"schemes";a:6:{s:7:"default";a:2:{s:5:"title";s:21:"Blue Lagoon (default)";s:6:"colors";a:9:{s:3:"top";s:7:"#0779bf";s:6:"bottom";s:7:"#48a9e4";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#f6f6f2";s:14:"sidebarborders";s:7:"#f9f9f9";s:6:"footer";s:7:"#292929";s:11:"titleslogan";s:7:"#fffeff";s:4:"text";s:7:"#3b3b3b";s:4:"link";s:7:"#0071B3";}}s:9:"firehouse";a:2:{s:5:"title";s:9:"Firehouse";s:6:"colors";a:9:{s:3:"top";s:7:"#cd2d2d";s:6:"bottom";s:7:"#cf3535";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#f1f4f0";s:14:"sidebarborders";s:7:"#ededed";s:6:"footer";s:7:"#1f1d1c";s:11:"titleslogan";s:7:"#fffeff";s:4:"text";s:7:"#3b3b3b";s:4:"link";s:7:"#d6121f";}}s:3:"ice";a:2:{s:5:"title";s:3:"Ice";s:6:"colors";a:9:{s:3:"top";s:7:"#d0d0d0";s:6:"bottom";s:7:"#c2c4c5";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#ffffff";s:14:"sidebarborders";s:7:"#cccccc";s:6:"footer";s:7:"#24272c";s:11:"titleslogan";s:7:"#000000";s:4:"text";s:7:"#4a4a4a";s:4:"link";s:7:"#019dbf";}}s:4:"plum";a:2:{s:5:"title";s:4:"Plum";s:6:"colors";a:9:{s:3:"top";s:7:"#4c1c58";s:6:"bottom";s:7:"#593662";s:2:"bg";s:7:"#fffdf7";s:7:"sidebar";s:7:"#edede7";s:14:"sidebarborders";s:7:"#e7e7e7";s:6:"footer";s:7:"#2c2c28";s:11:"titleslogan";s:7:"#ffffff";s:4:"text";s:7:"#301313";s:4:"link";s:7:"#9d408d";}}s:5:"slate";a:2:{s:5:"title";s:5:"Slate";s:6:"colors";a:9:{s:3:"top";s:7:"#4a4a4a";s:6:"bottom";s:7:"#4e4e4e";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#ffffff";s:14:"sidebarborders";s:7:"#d0d0d0";s:6:"footer";s:7:"#161617";s:11:"titleslogan";s:7:"#ffffff";s:4:"text";s:7:"#3b3b3b";s:4:"link";s:7:"#0073b6";}}s:0:"";a:2:{s:5:"title";s:6:"Custom";s:6:"colors";a:0:{}}}s:3:"css";a:1:{i:0;s:14:"css/colors.css";}s:4:"copy";a:1:{i:0;s:8:"logo.png";}s:9:"gradients";a:1:{i:0;a:3:{s:9:"dimension";a:4:{i:0;i:0;i:1;i:0;i:2;i:0;i:3;i:0;}s:9:"direction";s:8:"vertical";s:6:"colors";a:2:{i:0;s:3:"top";i:1;s:6:"bottom";}}}s:4:"fill";a:0:{}s:6:"slices";a:0:{}s:12:"blend_target";s:7:"#ffffff";s:11:"preview_css";s:17:"color/preview.css";s:10:"preview_js";s:16:"color/preview.js";s:12:"preview_html";s:18:"color/preview.html";s:10:"base_image";s:14:"color/base.png";}}',
))
->values(array(
'name' => 'theme_seven_settings',
'value' => 'a:15:{s:11:"toggle_logo";i:1;s:11:"toggle_name";i:1;s:13:"toggle_slogan";i:1;s:24:"toggle_node_user_picture";i:1;s:27:"toggle_comment_user_picture";i:0;s:32:"toggle_comment_user_verification";i:1;s:14:"toggle_favicon";i:1;s:16:"toggle_main_menu";i:1;s:21:"toggle_secondary_menu";i:0;s:12:"default_logo";i:1;s:9:"logo_path";s:0:"";s:11:"logo_upload";s:0:"";s:15:"default_favicon";i:1;s:12:"favicon_path";s:0:"";s:14:"favicon_upload";s:0:"";}',
))
->values(array(
'name' => 'tracker_batch_size',
'value' => 'i:999;',

View file

@ -0,0 +1,6 @@
name: 'Migrate field plugin manager test'
type: module
description: 'Example module demonstrating the field plugin manager in the Migrate API.'
package: Testing
version: VERSION
core: 8.x

View file

@ -0,0 +1,14 @@
<?php
/**
* @file
* Module for Migrate Field Plugin Manager testing.
*/
use Drupal\migrate_field_plugin_manager_test\Plugin\migrate\cckfield\d6\FileField;
function migrate_field_plugin_manager_test_migrate_field_info_alter(array &$definitions) {
if (isset($definitions['filefield'])) {
$definitions['filefield']['class'] = FileField::class;
}
}

View file

@ -0,0 +1,32 @@
<?php
namespace Drupal\migrate_field_plugin_manager_test\Plugin\migrate\cckfield\d6;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Plugin\migrate\cckfield\CckFieldPluginBase;
/**
* @MigrateCckField(
* id = "filefield",
* core = {6}
* )
*/
class FileField extends CckFieldPluginBase {
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
return [];
}
/**
* {@inheritdoc}
*/
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
$migration->mergeProcessOfProperty($field_name, [
'class' => __CLASS__,
]);
}
}

View file

@ -0,0 +1,31 @@
<?php
namespace Drupal\migrate_field_plugin_manager_test\Plugin\migrate\field;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
use Drupal\migrate\Plugin\MigrationInterface;
/**
* @MigrateField(
* id = "d6_file",
* core = {6},
* type_map = {
* "file" = "file"
* }
* )
*/
class D6FileField extends FieldPluginBase {
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
return [];
}
/**
* {@inheritdoc}
*/
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {}
}

View file

@ -0,0 +1,27 @@
<?php
namespace Drupal\migrate_field_plugin_manager_test\Plugin\migrate\field;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
use Drupal\migrate\Plugin\MigrationInterface;
/**
* @MigrateField(
* id = "d6_no_core_version_specified"
* )
*/
class D6NoCoreVersionSpecified extends FieldPluginBase {
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
return [];
}
/**
* {@inheritdoc}
*/
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {}
}

View file

@ -0,0 +1,29 @@
<?php
namespace Drupal\Tests\migrate_drupal\Kernel;
use Drupal\migrate_field_plugin_manager_test\Plugin\migrate\cckfield\d6\FileField;
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
/**
* @group migrate_drupal
*/
class CckFieldBackwardsCompatibilityTest extends MigrateDrupal6TestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['file', 'migrate_field_plugin_manager_test'];
/**
* Ensures that the cckfield backwards compatibility layer is invoked.
*/
public function testBackwardsCompatibility() {
$migration = $this->container
->get('plugin.manager.migration')
->getDefinition('d6_node:story');
$this->assertSame(FileField::class, $migration['process']['field_test_filefield']['class']);
}
}

View file

@ -0,0 +1,51 @@
<?php
namespace Drupal\Tests\migrate_drupal\Kernel;
use Drupal\Component\Plugin\Exception\PluginNotFoundException;
/**
* Tests the field plugin manager.
*
* @group migrate_drupal
*/
class MigrateFieldPluginManagerTest extends MigrateDrupalTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['system', 'user', 'field', 'migrate_drupal', 'options', 'file', 'text', 'migrate_field_plugin_manager_test'];
/**
* Tests that the correct MigrateField plugins are used.
*/
public function testPluginSelection() {
$plugin_manager = $this->container->get('plugin.manager.migrate.field');
try {
// If this test passes, getPluginIdFromFieldType will raise a
// PluginNotFoundException and we'll never reach fail().
$plugin_manager->getPluginIdFromFieldType('filefield', ['core' => 7]);
$this->fail('Expected Drupal\Component\Plugin\Exception\PluginNotFoundException.');
}
catch (PluginNotFoundException $e) {
$this->assertIdentical($e->getMessage(), "Plugin ID 'filefield' was not found.");
}
$this->assertIdentical('d6_file', $plugin_manager->getPluginIdFromFieldType('file', ['core' => 6]));
// Test fallback when no core version is specified.
$this->assertIdentical('d6_no_core_version_specified', $plugin_manager->getPluginIdFromFieldType('d6_no_core_version_specified', ['core' => 6]));
try {
// If this test passes, getPluginIdFromFieldType will raise a
// PluginNotFoundException and we'll never reach fail().
$plugin_manager->getPluginIdFromFieldType('d6_no_core_version_specified', ['core' => 7]);
$this->fail('Expected Drupal\Component\Plugin\Exception\PluginNotFoundException.');
}
catch (PluginNotFoundException $e) {
$this->assertIdentical($e->getMessage(), "Plugin ID 'd6_no_core_version_specified' was not found.");
}
}
}

View file

@ -0,0 +1,57 @@
<?php
namespace Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source;
use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
/**
* Tests the variable multirow source plugin.
*
* @covers \Drupal\migrate_drupal\Plugin\migrate\source\VariableMultiRow
*
* @group migrate_drupal
*/
class VariableMultiRowTest extends MigrateSqlSourceTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['migrate_drupal'];
/**
* {@inheritdoc}
*/
public function providerSource() {
$tests = [];
// The source data.
$tests[0]['source_data']['variable'] = [
['name' => 'foo', 'value' => 'i:1;'],
['name' => 'bar', 'value' => 'b:0;'],
];
// The expected results.
$tests[0]['expected_data'] = [
[
'name' => 'foo',
'value' => 1,
],
[
'name' => 'bar',
'value' => FALSE,
],
];
// The expected count.
$tests[0]['expected_count'] = NULL;
// The source plugin configuration.
$tests[0]['configuration']['variables'] = [
'foo',
'bar',
];
return $tests;
}
}

View file

@ -0,0 +1,54 @@
<?php
namespace Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source;
use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
/**
* Tests the variable source plugin.
*
* @covers \Drupal\migrate_drupal\Plugin\migrate\source\Variable
*
* @group migrate_drupal
*/
class VariableTest extends MigrateSqlSourceTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['migrate_drupal'];
/**
* {@inheritdoc}
*/
public function providerSource() {
$tests = [];
// The source data.
$tests[0]['source_data']['variable'] = [
['name' => 'foo', 'value' => 'i:1;'],
['name' => 'bar', 'value' => 'b:0;'],
];
// The expected results.
$tests[0]['expected_data'] = [
[
'id' => 'foo',
'foo' => 1,
'bar' => FALSE,
],
];
// The expected count.
$tests[0]['expected_count'] = NULL;
// The source plugin configuration.
$tests[0]['configuration']['variables'] = [
'foo',
'bar',
];
return $tests;
}
}

View file

@ -0,0 +1,77 @@
<?php
namespace Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\d6;
use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
/**
* Tests the variable source plugin.
*
* @covers \Drupal\migrate_drupal\Plugin\migrate\source\d6\i18nVariable
*
* @group migrate_drupal
*/
class i18nVariableTest extends MigrateSqlSourceTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['migrate_drupal'];
/**
* {@inheritdoc}
*/
public function providerSource() {
$tests = [];
// The source data.
$tests[0]['source_data']['i18n_variable'] = [
[
'name' => 'site_slogan',
'language' => 'fr',
'value' => 's:19:"Migrate est génial";',
],
[
'name' => 'site_name',
'language' => 'fr',
'value' => 's:11:"nom de site";',
],
[
'name' => 'site_slogan',
'language' => 'mi',
'value' => 's:19:"Ko whakamataku heke";',
],
[
'name' => 'site_name',
'language' => 'mi',
'value' => 's:9:"ingoa_pae";',
],
];
// The expected results.
$tests[0]['expected_data'] = [
[
'language' => 'fr',
'site_slogan' => 'Migrate est génial',
'site_name' => 'nom de site',
],
[
'language' => 'mi',
'site_slogan' => 'Ko whakamataku heke',
'site_name' => 'ingoa_pae',
],
];
// The expected count.
$tests[0]['expected_count'] = NULL;
// The migration configuration.
$tests[0]['configuration']['variables'] = [
'site_slogan',
'site_name',
];
return $tests;
}
}

View file

@ -33,17 +33,18 @@ class MigrateDependenciesTest extends MigrateDrupal6TestBase {
'd6_node:company',
'd6_node:employee',
'd6_node:event',
'd6_node:forum',
'd6_node:page',
'd6_user',
'd6_node_type',
'd6_node_settings',
'd6_filter_format',
'd6_node:sponsor',
'd6_node:story',
'd6_node:test_event',
'd6_node:test_page',
'd6_node:test_planet',
'd6_node:test_story',
'd6_node_type',
'd6_node_settings',
'd6_filter_format',
'd6_user',
'd6_comment_type',
'd6_comment_entity_display',
'd6_comment_entity_form_display',

View file

@ -1,20 +0,0 @@
<?php
namespace Drupal\Tests\migrate_drupal\Unit\source;
/**
* Tests variable multirow source w/ high water handling.
*
* @group migrate_drupal
*/
class VariableMultiRowSourceWithHighwaterTest extends VariableMultiRowTestBase {
/**
* {@inheritdoc}
*/
protected function setUp() {
$this->migrationConfiguration['highWaterProperty']['field'] = 'test';
parent::setup();
}
}

View file

@ -1,12 +0,0 @@
<?php
namespace Drupal\Tests\migrate_drupal\Unit\source;
/**
* Tests D6 variable multirow source plugin.
*
* @group migrate_drupal
*/
class VariableMultiRowTest extends VariableMultiRowTestBase {
}