X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fmigrate_drupal_ui%2Ftests%2Fsrc%2FFunctional%2FMigrateUpgradeExecuteTestBase.php;fp=web%2Fcore%2Fmodules%2Fmigrate_drupal_ui%2Ftests%2Fsrc%2FFunctional%2FMigrateUpgradeExecuteTestBase.php;h=fc9529ee40132d56200dd517e91a5da7bf312c5f;hp=36925d2b84b59581e3b68146644389503277e04b;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php b/web/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php index 36925d2b8..fc9529ee4 100644 --- a/web/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php +++ b/web/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php @@ -2,7 +2,6 @@ namespace Drupal\Tests\migrate_drupal_ui\Functional; -use Drupal\migrate_drupal\MigrationConfigurationTrait; use Drupal\Tests\migrate_drupal\Traits\CreateTestContentEntitiesTrait; /** @@ -10,7 +9,6 @@ use Drupal\Tests\migrate_drupal\Traits\CreateTestContentEntitiesTrait; */ abstract class MigrateUpgradeExecuteTestBase extends MigrateUpgradeTestBase { - use MigrationConfigurationTrait; use CreateTestContentEntitiesTrait; /** @@ -70,16 +68,35 @@ abstract class MigrateUpgradeExecuteTestBase extends MigrateUpgradeTestBase { // Ensure submitting the form with invalid database credentials gives us a // nice warning. $this->drupalPostForm(NULL, [$driver . '[database]' => 'wrong'] + $edits, t('Review upgrade')); - $session->pageTextContains('Resolve the issue below to continue the upgrade.'); + $session->pageTextContains('Resolve all issues below to continue the upgrade.'); $this->drupalPostForm(NULL, $edits, t('Review upgrade')); // Ensure we get errors about missing modules. - $session->pageTextContains(t('Resolve the issue below to continue the upgrade')); + $session->pageTextContains(t('Resolve all issues below to continue the upgrade.')); $session->pageTextContains(t('The no_source_module plugin must define the source_module property.')); // Uninstall the module causing the missing module error messages. $this->container->get('module_installer')->uninstall(['migration_provider_test'], TRUE); + // Test the file sources. + $this->drupalGet('/upgrade'); + $this->drupalPostForm(NULL, [], t('Continue')); + if ($version == 6) { + $paths['d6_source_base_path'] = DRUPAL_ROOT . '/wrong-path'; + } + else { + $paths['source_base_path'] = 'https://example.com/wrong-path'; + $paths['source_private_file_path'] = DRUPAL_ROOT . '/wrong-path'; + } + $this->drupalPostForm(NULL, $paths + $edits, t('Review upgrade')); + if ($version == 6) { + $session->responseContains('Unable to read from Files directory.'); + } + else { + $session->responseContains('Unable to read from Public files directory.'); + $session->responseContains('Unable to read from Private files directory.'); + } + // Restart the upgrade process. $this->drupalGet('/upgrade'); $session->responseContains('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal 8.'); @@ -121,7 +138,7 @@ abstract class MigrateUpgradeExecuteTestBase extends MigrateUpgradeTestBase { $this->drupalPostForm(NULL, $edits, t('Review upgrade')); $session->pageTextContains('WARNING: Content may be overwritten on your new site.'); $session->pageTextContains('There is conflicting content of these types:'); - $session->pageTextContains('file entities'); + $session->pageTextContains('files'); $session->pageTextContains('content item revisions'); $session->pageTextContains('There is translated content of these types:'); $session->pageTextContains('content items');