namespace Drupal\Tests\migrate_drupal_ui\Functional;
-use Drupal\migrate_drupal\MigrationConfigurationTrait;
use Drupal\Tests\migrate_drupal\Traits\CreateTestContentEntitiesTrait;
/**
*/
abstract class MigrateUpgradeExecuteTestBase extends MigrateUpgradeTestBase {
- use MigrationConfigurationTrait;
use CreateTestContentEntitiesTrait;
/**
// 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.');
$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');