Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / migrate_drupal_ui / tests / src / Functional / d7 / MigrateUpgrade7Test.php
index 3f25bcf20033f955c3a17ace60f3588e734feb15..385a4e58040a3d95acefd61a9572674ba4be0a2e 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace Drupal\Tests\migrate_drupal_ui\Functional\d7;
 
-use Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeTestBase;
+use Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeExecuteTestBase;
 use Drupal\user\Entity\User;
 
 /**
@@ -12,12 +12,25 @@ use Drupal\user\Entity\User;
  *
  * @group migrate_drupal_ui
  */
-class MigrateUpgrade7Test extends MigrateUpgradeTestBase {
+class MigrateUpgrade7Test extends MigrateUpgradeExecuteTestBase {
 
   /**
-   * {@inheritdoc}
+   * Modules to enable.
+   *
+   * @var array
    */
-  public static $modules = ['file'];
+  public static $modules = [
+    'file',
+    'language',
+    'content_translation',
+    'migrate_drupal_ui',
+    'telephone',
+    'aggregator',
+    'book',
+    'forum',
+    'statistics',
+    'migration_provider_test',
+  ];
 
   /**
    * {@inheritdoc}
@@ -39,7 +52,7 @@ class MigrateUpgrade7Test extends MigrateUpgradeTestBase {
    */
   protected function getEntityCounts() {
     return [
-      'aggregator_item' => 10,
+      'aggregator_item' => 11,
       'aggregator_feed' => 1,
       'block' => 25,
       'block_content' => 1,
@@ -72,7 +85,7 @@ class MigrateUpgrade7Test extends MigrateUpgradeTestBase {
       'tour' => 4,
       'user' => 4,
       'user_role' => 3,
-      'menu_link_content' => 7,
+      'menu_link_content' => 8,
       'view' => 16,
       'date_format' => 11,
       'entity_form_display' => 17,
@@ -83,11 +96,95 @@ class MigrateUpgrade7Test extends MigrateUpgradeTestBase {
     ];
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  protected function getEntityCountsIncremental() {
+    $counts = $this->getEntityCounts();
+    $counts['block_content'] = 2;
+    $counts['comment'] = 2;
+    $counts['file'] = 4;
+    $counts['menu_link_content'] = 9;
+    $counts['node'] = 6;
+    $counts['taxonomy_term'] = 19;
+    $counts['user'] = 5;
+    return $counts;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getAvailablePaths() {
+    return [
+      'aggregator',
+      'block',
+      'comment',
+      'contact',
+      'date',
+      'dblog',
+      'email',
+      'entityreference',
+      'field',
+      'field_sql_storage',
+      'file',
+      'filter',
+      'forum',
+      'image',
+      'language',
+      'link',
+      'list',
+      'locale',
+      'menu',
+      'node',
+      'number',
+      'options',
+      'path',
+      'phone',
+      'search',
+      'shortcut',
+      'statistics',
+      'system',
+      'taxonomy',
+      'text',
+      'user',
+      // Include modules that do not have an upgrade path and are enabled in the
+      // source database, defined in the $noUpgradePath property
+      // in MigrateUpgradeForm.
+      'blog',
+      'contextual',
+      'date_api',
+      'entity',
+      'field_ui',
+      'help',
+      'php',
+      'simpletest',
+      'toolbar',
+      'translation',
+      'trigger',
+    ];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getMissingPaths() {
+    return [
+      'book',
+      'color',
+      'rdf',
+      // These modules are in the missing path list because they are installed
+      // on the source site but they are not installed on the destination site.
+      'syslog',
+      'tracker',
+      'update',
+    ];
+  }
+
   /**
    * Executes all steps of migrations upgrade.
    */
-  public function testMigrateUpgrade() {
-    parent::testMigrateUpgrade();
+  public function testMigrateUpgradeExecute() {
+    parent::testMigrateUpgradeExecute();
 
     // Ensure migrated users can log in.
     $user = User::load(2);