Problem/Motivation

MigrateDrupal6Test loads all the dumps of the different Drupal6 migrations, and tests the complete migration.
We will need similar behavior for MigrateDrupal7Test, MigrateMultilingualDrupal6 et al.

Proposed resolution

Create a MigrateFullDrupalTestBase abstract class, and move the tearDown and testDrupal methods, so they can be reused.

Remaining tasks

User interface changes

None.

API changes

None.

CommentFileSizeAuthor
#3 2264717-3.patch12.43 KBpenyaskito
#3 interdiff.txt842 bytespenyaskito
#1 2264717-1.patch12.33 KBpenyaskito
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

penyaskito’s picture

Status: Active » Needs review
FileSize
12.33 KB
chx’s picture

Status: Needs review » Reviewed & tested by the community

great! the reason we are not making these properties because the files might come from different directories; indeed it's expected for multilingual and d7 both.

penyaskito’s picture

FileSize
842 bytes
12.43 KB

Missed return docs as @benjy noticed on IRC.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

This is just moving code around so no real reason not to commit it, but...

+++ b/core/modules/migrate_drupal/lib/Drupal/migrate_drupal/Tests/d6/MigrateDrupal6Test.php
@@ -50,6 +48,94 @@ class MigrateDrupal6Test extends MigrateDrupalTestBase {
+   * Migrations to run in the test.
+   *
+   * @var array
+   */
+  static $migrations = array(
+    'd6_action_settings',
+    'd6_aggregator_settings',
+    'd6_aggregator_feed',

Yikes, that looks brittle. Seems like it would be very easy for us to add a new D6 migration and for it to be forgotten in this list. In a follow-up, is there any way to have it just do "Give me all migrations that start with d6_*" since that seems to be what's wanted here?

Either way, this was a "pre-existing condition" in HEAD, so..

Committed and pushed to 8.x. Thanks!

  • Commit 49b4f93 on 8.x by webchick:
    Issue #2264717 by penyaskito: Convert MigrateDrupal6Test into a reusable...
chx’s picture

While #4 seems reasonable on the surface, that's just how things are currently. please see #2 why it is not feasible.

Later, if we have the grouping we desire then we might want to revisit this.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.