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

View file

@ -19,7 +19,7 @@ process:
name: name
weight: weight
parent:
plugin: migration
plugin: migration_lookup
migration: taxonomy_term_stub_test
source: parent
destination:

View file

@ -14,7 +14,7 @@ class MigrateTermNodeRevisionTest extends MigrateDrupal6TestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['taxonomy'];
public static $modules = ['taxonomy', 'menu_ui'];
/**
* {@inheritdoc}

View file

@ -15,7 +15,7 @@ class MigrateTermNodeTest extends MigrateDrupal6TestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['taxonomy'];
public static $modules = ['taxonomy', 'menu_ui'];
/**
* {@inheritdoc}

View file

@ -15,20 +15,31 @@ class MigrateVocabularyEntityDisplayTest extends MigrateDrupal6TestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['field', 'taxonomy'];
public static $modules = ['field', 'taxonomy', 'menu_ui'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->migrateTaxonomy();
// Execute Dependency Migrations.
$this->migrateContentTypes();
$this->installEntitySchema('taxonomy_term');
$this->executeMigrations([
'd6_node_type',
'd6_taxonomy_vocabulary',
'd6_vocabulary_field',
'd6_vocabulary_field_instance',
]);
}
/**
* Tests the Drupal 6 vocabulary-node type association to Drupal 8 migration.
*/
public function testVocabularyEntityDisplay() {
$this->executeMigration('d6_vocabulary_entity_display');
// Test that the field exists.
$component = EntityViewDisplay::load('node.page.default')->getComponent('tags');
$this->assertIdentical('entity_reference_label', $component['type']);
@ -37,4 +48,23 @@ class MigrateVocabularyEntityDisplayTest extends MigrateDrupal6TestBase {
$this->assertIdentical(['node', 'article', 'default', 'tags'], $this->getMigration('d6_vocabulary_entity_display')->getIdMap()->lookupDestinationID([4, 'article']));
}
/**
* Tests that vocabulary displays are ignored appropriately.
*
* Vocabulary displays should be ignored when they belong to node types which
* were not migrated.
*/
public function testSkipNonExistentNodeType() {
// The "story" node type is migrated by d6_node_type but we need to pretend
// that it didn't occur, so record that in the map table.
$this->mockFailure('d6_node_type', ['type' => 'story']);
// d6_vocabulary_entity_display should skip over the "story" node type
// config because, according to the map table, it didn't occur.
$migration = $this->getMigration('d6_vocabulary_entity_display');
$this->executeMigration($migration);
$this->assertNull($migration->getIdMap()->lookupDestinationIds(['type' => 'story'])[0][0]);
}
}

View file

@ -15,20 +15,31 @@ class MigrateVocabularyEntityFormDisplayTest extends MigrateDrupal6TestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['taxonomy'];
public static $modules = ['taxonomy', 'menu_ui'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->migrateTaxonomy();
// Execute Dependency Migrations.
$this->migrateContentTypes();
$this->installEntitySchema('taxonomy_term');
$this->executeMigrations([
'd6_taxonomy_vocabulary',
'd6_vocabulary_field',
'd6_vocabulary_field_instance',
'd6_vocabulary_entity_display',
]);
}
/**
* Tests the Drupal 6 vocabulary-node type association to Drupal 8 migration.
*/
public function testVocabularyEntityFormDisplay() {
$this->executeMigration('d6_vocabulary_entity_form_display');
// Test that the field exists.
$component = EntityFormDisplay::load('node.page.default')->getComponent('tags');
$this->assertIdentical('options_select', $component['type']);
@ -42,4 +53,23 @@ class MigrateVocabularyEntityFormDisplayTest extends MigrateDrupal6TestBase {
$this->assertIdentical($entity_form_display->getComponent('vocabulary_2_i_1_')['type'], 'entity_reference_autocomplete_tags');
}
/**
* Tests that vocabulary displays are ignored appropriately.
*
* Vocabulary displays should be ignored when they belong to node types which
* were not migrated.
*/
public function testSkipNonExistentNodeType() {
// The "story" node type is migrated by d6_node_type but we need to pretend
// that it didn't occur, so record that in the map table.
$this->mockFailure('d6_node_type', ['type' => 'story']);
// d6_vocabulary_entity_form_display should skip over the "story" node type
// config because, according to the map table, it didn't occur.
$migration = $this->getMigration('d6_vocabulary_entity_form_display');
$this->executeMigration($migration);
$this->assertNull($migration->getIdMap()->lookupDestinationIds(['type' => 'story'])[0][0]);
}
}

View file

@ -15,20 +15,30 @@ class MigrateVocabularyFieldInstanceTest extends MigrateDrupal6TestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['taxonomy'];
public static $modules = ['taxonomy', 'menu_ui'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->migrateTaxonomy();
// Execute Dependency Migrations.
$this->migrateContentTypes();
$this->installEntitySchema('taxonomy_term');
$this->executeMigrations([
'd6_node_type',
'd6_taxonomy_vocabulary',
'd6_vocabulary_field',
]);
}
/**
* Tests the Drupal 6 vocabulary-node type association to Drupal 8 migration.
*/
public function testVocabularyFieldInstance() {
$this->executeMigration('d6_vocabulary_field_instance');
// Test that the field exists.
$field_id = 'node.article.tags';
$field = FieldConfig::load($field_id);
@ -50,10 +60,29 @@ class MigrateVocabularyFieldInstanceTest extends MigrateDrupal6TestBase {
$this->assertIdentical(['node', 'article', 'tags'], $this->getMigration('d6_vocabulary_field_instance')->getIdMap()->lookupDestinationID([4, 'article']));
// Test the the field vocabulary_1_i_0_
// Test the the field vocabulary_1_i_0_.
$field_id = 'node.story.vocabulary_1_i_0_';
$field = FieldConfig::load($field_id);
$this->assertFalse($field->isRequired(), 'Field is not required');
}
/**
* Tests that vocabulary field instances are ignored appropriately.
*
* Vocabulary field instances should be ignored when they belong to node
* types which were not migrated.
*/
public function testSkipNonExistentNodeType() {
// The "story" node type is migrated by d6_node_type but we need to pretend
// that it didn't occur, so record that in the map table.
$this->mockFailure('d6_node_type', ['type' => 'story']);
// d6_vocabulary_field_instance should skip over the "story" node type
// config because, according to the map table, it didn't occur.
$migration = $this->getMigration('d6_vocabulary_field_instance');
$this->executeMigration($migration);
$this->assertNull($migration->getIdMap()->lookupDestinationIds(['type' => 'story'])[0][0]);
}
}

View file

@ -15,7 +15,7 @@ class MigrateVocabularyFieldTest extends MigrateDrupal6TestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['taxonomy'];
public static $modules = ['taxonomy', 'menu_ui'];
/**
* {@inheritdoc}

View file

@ -20,6 +20,7 @@ class MigrateNodeTaxonomyTest extends MigrateDrupal7TestBase {
'filter',
'image',
'link',
'menu_ui',
'node',
'taxonomy',
'telephone',

View file

@ -18,6 +18,7 @@ class MigrateTaxonomyTermTest extends MigrateDrupal7TestBase {
'datetime',
'image',
'link',
'menu_ui',
'node',
'taxonomy',
'telephone',

View file

@ -57,6 +57,7 @@ class MigrateTaxonomyVocabularyTest extends MigrateDrupal7TestBase {
$this->assertEntity('tags', 'Tags', 'Use tags to group articles on similar topics into categories.', VocabularyInterface::HIERARCHY_DISABLED, 0);
$this->assertEntity('forums', 'Forums', 'Forum navigation vocabulary', VocabularyInterface::HIERARCHY_SINGLE, -10);
$this->assertEntity('test_vocabulary', 'Test Vocabulary', 'This is the vocabulary description', VocabularyInterface::HIERARCHY_SINGLE, 0);
$this->assertEntity('vocabulary_name_much_longer_than', 'vocabulary name much longer than thirty two characters', 'description of vocabulary name much longer than thirty two characters', VocabularyInterface::HIERARCHY_SINGLE, 0);
}
}