summaryrefslogtreecommitdiffstats
path: root/core/modules/migrate_drupal
diff options
context:
space:
mode:
authorNathaniel Catchpole2019-01-07 11:40:36 (GMT)
committerNathaniel Catchpole2019-01-07 11:41:01 (GMT)
commit305fd923942dd0ae267e00bb2da596b54f4ada44 (patch)
tree12eb7fff95303dc421fc5595ecc87b3b5c0080c7 /core/modules/migrate_drupal
parent8f75b2aaccb756b0a8d1025cf5ce128cd039990d (diff)
Issue #3023747 by mikelutz, heddn: D6 profile migrations assume stubs, which fail
(cherry picked from commit 95b3b17867f3691951e4fa2bc4bb0b7c21431fba)
Diffstat (limited to 'core/modules/migrate_drupal')
-rw-r--r--core/modules/migrate_drupal/tests/src/Kernel/d6/MigrationProcessTest.php43
-rw-r--r--core/modules/migrate_drupal/tests/src/Kernel/d7/MigrationProcessTest.php43
2 files changed, 86 insertions, 0 deletions
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrationProcessTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrationProcessTest.php
new file mode 100644
index 0000000..4292769
--- /dev/null
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d6/MigrationProcessTest.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace Drupal\Tests\migrate_drupal\Kernel\d6;
+
+use Drupal\KernelTests\FileSystemModuleDiscoveryDataProviderTrait;
+
+/**
+ * Tests the getProcess() method of all Drupal 6 migrations.
+ *
+ * @group migrate_drupal
+ */
+class MigrationProcessTest extends MigrateDrupal6TestBase {
+ use FileSystemModuleDiscoveryDataProviderTrait;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setUp() {
+ self::$modules = array_keys($this->coreModuleListDataProvider());
+ parent::setUp();
+ }
+
+ /**
+ * Tests that calling getProcess() on a migration does not throw an exception.
+ *
+ * @throws \Exception
+ */
+ public function testGetProcess() {
+ /** @var \Drupal\migrate\Plugin\MigrationPluginManagerInterface $plugin_manager */
+ $plugin_manager = $this->container->get('plugin.manager.migration');
+ $migrations = $plugin_manager->createInstancesByTag('Drupal 6');
+ foreach ($migrations as $migration) {
+ try {
+ $process = $migration->getProcess();
+ }
+ catch (\Exception $e) {
+ $this->fail(sprintf("Migration %s process failed with error: %s", $migration->label(), $e->getMessage()));
+ }
+ $this->assertNotNull($process);
+ }
+ }
+
+}
diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrationProcessTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrationProcessTest.php
new file mode 100644
index 0000000..4f3826f
--- /dev/null
+++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/MigrationProcessTest.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace Drupal\Tests\migrate_drupal\Kernel\d7;
+
+use Drupal\KernelTests\FileSystemModuleDiscoveryDataProviderTrait;
+
+/**
+ * Tests the getProcess() method of all Drupal 7 migrations.
+ *
+ * @group migrate_drupal
+ */
+class MigrationProcessTest extends MigrateDrupal7TestBase {
+ use FileSystemModuleDiscoveryDataProviderTrait;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setUp() {
+ self::$modules = array_keys($this->coreModuleListDataProvider());
+ parent::setUp();
+ }
+
+ /**
+ * Tests that calling getProcess() on a migration does not throw an exception.
+ *
+ * @throws \Exception
+ */
+ public function testGetProcess() {
+ /** @var \Drupal\migrate\Plugin\MigrationPluginManagerInterface $plugin_manager */
+ $plugin_manager = $this->container->get('plugin.manager.migration');
+ $migrations = $plugin_manager->createInstancesByTag('Drupal 7');
+ foreach ($migrations as $migration) {
+ try {
+ $process = $migration->getProcess();
+ }
+ catch (\Exception $e) {
+ $this->fail(sprintf("Migration %s process failed with error: %s", $migration->label(), $e->getMessage()));
+ }
+ $this->assertNotNull($process);
+ }
+ }
+
+}