Commit d2404bee authored by webchick's avatar webchick

Issue #2550823 by phenaproxima, neclimdul: Migrate Drupal integration tests...

Issue #2550823 by phenaproxima, neclimdul: Migrate Drupal integration tests should load all dump files
parent d6002691
...@@ -31,7 +31,6 @@ class MigrateActionConfigsTest extends MigrateDrupal6TestBase { ...@@ -31,7 +31,6 @@ class MigrateActionConfigsTest extends MigrateDrupal6TestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->loadDumps(['Variable.php']);
$this->executeMigration('d6_action_settings'); $this->executeMigration('d6_action_settings');
} }
......
...@@ -31,7 +31,6 @@ class MigrateAggregatorConfigsTest extends MigrateDrupal6TestBase { ...@@ -31,7 +31,6 @@ class MigrateAggregatorConfigsTest extends MigrateDrupal6TestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->loadDumps(['Variable.php']);
$this->executeMigration('d6_aggregator_settings'); $this->executeMigration('d6_aggregator_settings');
} }
......
...@@ -25,7 +25,6 @@ class MigrateAggregatorFeedTest extends MigrateDrupal6TestBase { ...@@ -25,7 +25,6 @@ class MigrateAggregatorFeedTest extends MigrateDrupal6TestBase {
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->installEntitySchema('aggregator_feed'); $this->installEntitySchema('aggregator_feed');
$this->loadDumps(['AggregatorFeed.php']);
$this->executeMigration('d6_aggregator_feed'); $this->executeMigration('d6_aggregator_feed');
} }
......
...@@ -45,7 +45,6 @@ protected function setUp() { ...@@ -45,7 +45,6 @@ protected function setUp() {
)); ));
$entity->enforceIsNew(); $entity->enforceIsNew();
$entity->save(); $entity->save();
$this->loadDumps(['AggregatorItem.php']);
$this->executeMigration('d6_aggregator_item'); $this->executeMigration('d6_aggregator_item');
} }
......
...@@ -24,7 +24,6 @@ class MigrateAggregatorSettingsTest extends MigrateDrupal7TestBase { ...@@ -24,7 +24,6 @@ class MigrateAggregatorSettingsTest extends MigrateDrupal7TestBase {
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->installConfig(static::$modules); $this->installConfig(static::$modules);
$this->loadDumps(['Variable.php']);
$this->executeMigration('d7_aggregator_settings'); $this->executeMigration('d7_aggregator_settings');
} }
......
...@@ -32,7 +32,6 @@ class MigrateBlockedIPsTest extends MigrateDrupal7TestBase { ...@@ -32,7 +32,6 @@ class MigrateBlockedIPsTest extends MigrateDrupal7TestBase {
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->installSchema('ban', ['ban_ip']); $this->installSchema('ban', ['ban_ip']);
$this->loadDumps(['BlockedIps.php']);
$this->executeMigration('d7_blocked_ips'); $this->executeMigration('d7_blocked_ips');
} }
......
...@@ -71,7 +71,6 @@ protected function setUp() { ...@@ -71,7 +71,6 @@ protected function setUp() {
// Install one of D8's test themes. // Install one of D8's test themes.
\Drupal::service('theme_handler')->install(array('test_theme')); \Drupal::service('theme_handler')->install(array('test_theme'));
$this->loadDumps(['Blocks.php', 'BlocksRoles.php', 'AggregatorFeed.php']);
$this->executeMigration('d6_block'); $this->executeMigration('d6_block');
} }
......
...@@ -35,7 +35,6 @@ protected function setUp() { ...@@ -35,7 +35,6 @@ protected function setUp() {
array(array(2), array('full_html')) array(array(2), array('full_html'))
) )
)); ));
$this->loadDumps(['Boxes.php']);
$this->executeMigration('d6_custom_block'); $this->executeMigration('d6_custom_block');
} }
......
...@@ -31,7 +31,6 @@ class MigrateBookConfigsTest extends MigrateDrupal6TestBase { ...@@ -31,7 +31,6 @@ class MigrateBookConfigsTest extends MigrateDrupal6TestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->loadDumps(['Variable.php']);
$this->executeMigration('d6_book_settings'); $this->executeMigration('d6_book_settings');
} }
......
...@@ -42,8 +42,6 @@ protected function setUp() { ...@@ -42,8 +42,6 @@ protected function setUp() {
$id_mappings['d6_node'][] = array(array($i), array($i)); $id_mappings['d6_node'][] = array(array($i), array($i));
} }
$this->prepareMigrations($id_mappings); $this->prepareMigrations($id_mappings);
// Load database dumps to provide source data.
$this->loadDumps(['Book.php', 'MenuLinks.php']);
$this->executeMigration('d6_book'); $this->executeMigration('d6_book');
} }
......
...@@ -56,16 +56,6 @@ protected function setUp() { ...@@ -56,16 +56,6 @@ protected function setUp() {
'd6_comment_entity_form_display' => array(array(array('story'), array('node', 'story', 'default', 'comment'))), 'd6_comment_entity_form_display' => array(array(array('story'), array('node', 'story', 'default', 'comment'))),
); );
$this->prepareMigrations($id_mappings); $this->prepareMigrations($id_mappings);
$this->loadDumps([
'Node.php',
'NodeRevisions.php',
'ContentTypeStory.php',
'ContentTypeTestPlanet.php',
'Variable.php',
'NodeType.php',
'Comments.php',
]);
$this->executeMigration('d6_comment'); $this->executeMigration('d6_comment');
} }
......
...@@ -24,12 +24,9 @@ class MigrateCommentTypeTest extends MigrateDrupal6TestBase { ...@@ -24,12 +24,9 @@ class MigrateCommentTypeTest extends MigrateDrupal6TestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->installEntitySchema('node'); $this->installEntitySchema('node');
$this->installEntitySchema('comment'); $this->installEntitySchema('comment');
$this->installConfig(['node', 'comment']); $this->installConfig(['node', 'comment']);
$this->loadDumps(['Variable.php', 'NodeType.php']);
$this->executeMigration('d6_comment_type'); $this->executeMigration('d6_comment_type');
} }
......
...@@ -64,7 +64,6 @@ protected function setUp() { ...@@ -64,7 +64,6 @@ protected function setUp() {
), ),
); );
$this->prepareMigrations($id_mappings); $this->prepareMigrations($id_mappings);
$this->loadDumps(['Variable.php', 'NodeType.php']);
$this->executeMigration(static::MIGRATION); $this->executeMigration(static::MIGRATION);
} }
......
...@@ -42,7 +42,6 @@ protected function setUp() { ...@@ -42,7 +42,6 @@ protected function setUp() {
), ),
); );
$this->prepareMigrations($id_mappings); $this->prepareMigrations($id_mappings);
$this->loadDumps(['Variable.php', 'NodeType.php']);
$this->executeMigration('d6_comment_entity_form_display_subject'); $this->executeMigration('d6_comment_entity_form_display_subject');
} }
......
...@@ -41,7 +41,6 @@ protected function setUp() { ...@@ -41,7 +41,6 @@ protected function setUp() {
), ),
); );
$this->prepareMigrations($id_mappings); $this->prepareMigrations($id_mappings);
$this->loadDumps(['Variable.php', 'NodeType.php']);
$this->executeMigration('d6_comment_field'); $this->executeMigration('d6_comment_field');
} }
......
...@@ -49,7 +49,6 @@ protected function setUp() { ...@@ -49,7 +49,6 @@ protected function setUp() {
'type' => 'comment', 'type' => 'comment',
'translatable' => '0', 'translatable' => '0',
))->save(); ))->save();
$this->loadDumps(['Variable.php', 'NodeType.php']);
$this->executeMigration('d6_comment_field_instance'); $this->executeMigration('d6_comment_field_instance');
} }
......
...@@ -29,7 +29,6 @@ class MigrateContactCategoryTest extends MigrateDrupal6TestBase { ...@@ -29,7 +29,6 @@ class MigrateContactCategoryTest extends MigrateDrupal6TestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->loadDumps(['Contact.php']);
$this->executeMigration('d6_contact_category'); $this->executeMigration('d6_contact_category');
} }
......
...@@ -39,7 +39,6 @@ protected function setUp() { ...@@ -39,7 +39,6 @@ protected function setUp() {
), ),
); );
$this->prepareMigrations($id_mappings); $this->prepareMigrations($id_mappings);
$this->loadDumps(['Variable.php', 'Contact.php']);
$this->executeMigration('d6_contact_settings'); $this->executeMigration('d6_contact_settings');
} }
......
...@@ -31,7 +31,6 @@ class MigrateDblogConfigsTest extends MigrateDrupal6TestBase { ...@@ -31,7 +31,6 @@ class MigrateDblogConfigsTest extends MigrateDrupal6TestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->loadDumps(['Variable.php']);
$this->executeMigration('d6_dblog_settings'); $this->executeMigration('d6_dblog_settings');
} }
......
...@@ -29,7 +29,6 @@ class MigrateDblogConfigsTest extends MigrateDrupal7TestBase { ...@@ -29,7 +29,6 @@ class MigrateDblogConfigsTest extends MigrateDrupal7TestBase {
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->installConfig(static::$modules); $this->installConfig(static::$modules);
$this->loadDumps(['Variable.php']);
$this->executeMigration('d7_dblog_settings'); $this->executeMigration('d7_dblog_settings');
} }
......
...@@ -64,14 +64,6 @@ protected function setUp() { ...@@ -64,14 +64,6 @@ protected function setUp() {
), ),
); );
$this->prepareMigrations($id_mappings); $this->prepareMigrations($id_mappings);
$this->loadDumps([
'ContentNodeFieldInstance.php',
'ContentNodeField.php',
'ContentFieldTest.php',
'ContentFieldTestTwo.php',
'ContentFieldMultivalue.php',
]);
$this->executeMigration('d6_field_formatter_settings'); $this->executeMigration('d6_field_formatter_settings');
} }
......
...@@ -66,13 +66,6 @@ protected function setUp() { ...@@ -66,13 +66,6 @@ protected function setUp() {
entity_create('node_type', array('type' => 'story'))->save(); entity_create('node_type', array('type' => 'story'))->save();
entity_create('node_type', array('type' => 'test_page'))->save(); entity_create('node_type', array('type' => 'test_page'))->save();
$this->loadDumps([
'ContentNodeFieldInstance.php',
'ContentNodeField.php',
'ContentFieldTest.php',
'ContentFieldTestTwo.php',
'ContentFieldMultivalue.php',
]);
$this->createFields(); $this->createFields();
$this->executeMigration('d6_field_instance'); $this->executeMigration('d6_field_instance');
} }
......
...@@ -29,13 +29,6 @@ class MigrateFieldTest extends MigrateDrupal6TestBase { ...@@ -29,13 +29,6 @@ class MigrateFieldTest extends MigrateDrupal6TestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->loadDumps([
'ContentNodeFieldInstance.php',
'ContentNodeField.php',
'ContentFieldTest.php',
'ContentFieldTestTwo.php',
'ContentFieldMultivalue.php',
]);
$this->executeMigration('d6_field'); $this->executeMigration('d6_field');
} }
......
...@@ -61,13 +61,6 @@ protected function setUp() { ...@@ -61,13 +61,6 @@ protected function setUp() {
), ),
); );
$this->prepareMigrations($id_mappings); $this->prepareMigrations($id_mappings);
$this->loadDumps([
'ContentNodeFieldInstance.php',
'ContentNodeField.php',
'ContentFieldTest.php',
'ContentFieldTestTwo.php',
'ContentFieldMultivalue.php',
]);
$this->executeMigration('d6_field_instance_widget_settings'); $this->executeMigration('d6_field_instance_widget_settings');
} }
......
...@@ -31,7 +31,6 @@ class MigrateFileConfigsTest extends MigrateDrupal6TestBase { ...@@ -31,7 +31,6 @@ class MigrateFileConfigsTest extends MigrateDrupal6TestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->loadDumps(['Variable.php']);
$this->executeMigration('d6_file_settings'); $this->executeMigration('d6_file_settings');
} }
......
...@@ -44,7 +44,6 @@ protected function setUp() { ...@@ -44,7 +44,6 @@ protected function setUp() {
$this->installEntitySchema('file'); $this->installEntitySchema('file');
$this->installConfig(['file']); $this->installConfig(['file']);
$this->loadDumps(['Files.php']);
/** @var \Drupal\migrate\Entity\MigrationInterface $migration */ /** @var \Drupal\migrate\Entity\MigrationInterface $migration */
$migration = entity_load('migration', 'd6_file'); $migration = entity_load('migration', 'd6_file');
$source = $migration->get('source'); $source = $migration->get('source');
...@@ -74,8 +73,6 @@ public function testFiles() { ...@@ -74,8 +73,6 @@ public function testFiles() {
// Test that we can re-import and also test with file_directory_path set. // Test that we can re-import and also test with file_directory_path set.
db_truncate(entity_load('migration', 'd6_file')->getIdMap()->mapTableName())->execute(); db_truncate(entity_load('migration', 'd6_file')->getIdMap()->mapTableName())->execute();
$this->loadDumps(['Variable.php']);
// Update the file_directory_path. // Update the file_directory_path.
Database::getConnection('default', 'migrate') Database::getConnection('default', 'migrate')
->update('variable') ->update('variable')
......
...@@ -94,13 +94,6 @@ protected function setUp() { ...@@ -94,13 +94,6 @@ protected function setUp() {
$node->save(); $node->save();
} }
} }
$this->loadDumps([
'Node.php',
'NodeRevisions.php',
'ContentTypeStory.php',
'ContentTypeTestPlanet.php',
'Upload.php',
]);
} }
} }
...@@ -39,8 +39,6 @@ protected function setUp() { ...@@ -39,8 +39,6 @@ protected function setUp() {
), ),
); );
$this->prepareMigrations($id_mappings); $this->prepareMigrations($id_mappings);
$this->loadDumps(['NodeType.php', 'Variable.php']);
$this->executeMigration('d6_upload_entity_display'); $this->executeMigration('d6_upload_entity_display');
} }
......
...@@ -39,8 +39,6 @@ protected function setUp() { ...@@ -39,8 +39,6 @@ protected function setUp() {
), ),
); );
$this->prepareMigrations($id_mappings); $this->prepareMigrations($id_mappings);
$this->loadDumps(['NodeType.php', 'Variable.php']);
$this->executeMigration('d6_upload_entity_form_display'); $this->executeMigration('d6_upload_entity_form_display');
} }
......
...@@ -51,7 +51,6 @@ protected function setUp() { ...@@ -51,7 +51,6 @@ protected function setUp() {
'translatable' => '0', 'translatable' => '0',
))->save(); ))->save();
$this->loadDumps(['NodeType.php', 'Variable.php']);
$this->executeMigration('d6_upload_field_instance'); $this->executeMigration('d6_upload_field_instance');
} }
......
...@@ -26,7 +26,6 @@ class MigrateFileTest extends MigrateDrupal7TestBase { ...@@ -26,7 +26,6 @@ class MigrateFileTest extends MigrateDrupal7TestBase {
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->loadDumps(['FileManaged.php', 'Variable.php']);
$this->installEntitySchema('file'); $this->installEntitySchema('file');
$fs = \Drupal::service('file_system'); $fs = \Drupal::service('file_system');
......
...@@ -26,7 +26,6 @@ class MigrateFilterFormatTest extends MigrateDrupal6TestBase { ...@@ -26,7 +26,6 @@ class MigrateFilterFormatTest extends MigrateDrupal6TestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->loadDumps(['Filters.php', 'FilterFormats.php', 'Variable.php']);
$this->executeMigration('d6_filter_format'); $this->executeMigration('d6_filter_format');
} }
......
...@@ -28,7 +28,6 @@ class MigrateFilterFormatTest extends MigrateDrupal7TestBase { ...@@ -28,7 +28,6 @@ class MigrateFilterFormatTest extends MigrateDrupal7TestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->loadDumps(['Filter.php', 'FilterFormat.php', 'Variable.php']);
$this->executeMigration('d7_filter_format'); $this->executeMigration('d7_filter_format');
} }
......
...@@ -36,7 +36,6 @@ protected function setUp() { ...@@ -36,7 +36,6 @@ protected function setUp() {
array(array(1), array('vocabulary_1_i_0_')), array(array(1), array('vocabulary_1_i_0_')),
) )
)); ));
$this->loadDumps(['Variable.php']);
$this->executeMigration('d6_forum_settings'); $this->executeMigration('d6_forum_settings');
} }
......
...@@ -31,7 +31,6 @@ class MigrateLocaleConfigsTest extends MigrateDrupal6TestBase { ...@@ -31,7 +31,6 @@ class MigrateLocaleConfigsTest extends MigrateDrupal6TestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->loadDumps(['Variable.php']);
$this->executeMigration('locale_settings'); $this->executeMigration('locale_settings');
} }
......
...@@ -42,7 +42,6 @@ protected function setUp() { ...@@ -42,7 +42,6 @@ protected function setUp() {
), ),
)); ));
$this->loadDumps(['MenuLinks.php']);
$this->executeMigration('d6_menu_links'); $this->executeMigration('d6_menu_links');
} }
......
...@@ -24,7 +24,6 @@ class MigrateMenuSettingsTest extends MigrateDrupal7TestBase { ...@@ -24,7 +24,6 @@ class MigrateMenuSettingsTest extends MigrateDrupal7TestBase {
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->installConfig(['menu_ui']); $this->installConfig(['menu_ui']);
$this->loadDumps(['Variable.php']);
$this->executeMigration('menu_settings'); $this->executeMigration('menu_settings');
} }
......
...@@ -30,7 +30,8 @@ abstract class MigrateDrupalTestBase extends MigrateTestBase { ...@@ -30,7 +30,8 @@ abstract class MigrateDrupalTestBase extends MigrateTestBase {
*/ */
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->loadDumps(['System.php']); $tables = file_scan_directory($this->getDumpDirectory(), '/.php$/', array('recurse' => FALSE));