Commit 17bf4688 authored by Gábor Hojtsy's avatar Gábor Hojtsy

Issue #2908699 by Jo Fitzgerald, heddn, xjm: Several textual and markup...

Issue #2908699 by Jo Fitzgerald, heddn, xjm: Several textual and markup improvements to the Migrate Upgrade UI
parent 3e2d4340
......@@ -142,22 +142,20 @@ public function buildOverviewForm(array $form, FormStateInterface $form_state) {
}
else {
$form['info_header'] = [
'#markup' => '<p>' . $this->t('Upgrade a site by importing its database and files into a clean and empty new install of Drupal 8. See the <a href=":url">Drupal site upgrades handbook</a> for more information.', [
'#markup' => '<p>' . $this->t('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal 8. See the <a href=":url">Drupal site upgrades handbook</a> for more information.', [
':url' => 'https://www.drupal.org/upgrade/migrate',
]),
];
$legend[] = $this->t('<em>Old site:</em> the site you want to upgrade.');
$legend[] = $this->t('<em>New site:</em> this empty Drupal 8 installation you will import the old site to.');
$form['legend']['#markup'] = '';
$form['legend']['#markup'] .= '<h3>' . $this->t('Definitions') . '</h3>';
$form['legend']['#markup'] .= '<dl>';
$form['legend']['#markup'] .= '<dt>' . $this->t('Old site') . '</dt>';
$form['legend']['#markup'] .= '<dd>' . $this->t('The site you want to upgrade.') . '</dd>';
$form['legend']['#markup'] .= '<dt>' . $this->t('New site') . '</dt>';
$form['legend']['#markup'] .= '<dd>' . $this->t('This empty Drupal 8 installation you will import the old site to.') . '</dd>';
$form['legend']['#markup'] .= '</dl>';
$form['legend'] = [
'#theme' => 'item_list',
'#title' => $this->t('Definitions'),
'#list_type' => 'ul',
'#items' => $legend,
];
$info[] = $this->t('You may need multiple tries for a successful upgrade so <strong>backup the database</strong> for this new site. The upgrade will change it and you may want to revert to its initial state.');
$info[] = $this->t('Make sure that <strong>access to the database</strong> for the old site is available from this new site.');
$info[] = $this->t('<strong>If the old site has private files</strong>, a copy of its files directory must also be accessible on the host of this new site.');
$info[] = $this->t('<strong>Enable all modules on this new site</strong> that are enabled on the old site. For example, if the old site uses the book module, then enable the book module on this new site so that the existing data can be imported to it.');
......@@ -170,7 +168,7 @@ public function buildOverviewForm(array $form, FormStateInterface $form_state) {
$form['info'] = [
'#theme' => 'item_list',
'#title' => $this->t('Steps to prepare for the upgrade'),
'#title' => $this->t('Preparation steps'),
'#list_type' => 'ol',
'#items' => $info,
];
......
......@@ -119,7 +119,7 @@ protected function tearDown() {
public function testMigrateUpgrade() {
$connection_options = $this->sourceDatabase->getConnectionOptions();
$this->drupalGet('/upgrade');
$this->assertText('Upgrade a site by importing its database and files into a clean and empty new install of Drupal 8.');
$this->assertText('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, [], t('Continue'));
$this->assertText('Provide credentials for the database of the Drupal site you want to upgrade.');
......@@ -160,7 +160,7 @@ public function testMigrateUpgrade() {
// Restart the upgrade process.
$this->drupalGet('/upgrade');
$this->assertText('Upgrade a site by importing its database and files into a clean and empty new install of Drupal 8.');
$this->assertText('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, [], t('Continue'));
$this->assertText('Provide credentials for the database of the Drupal site you want to upgrade.');
......
......@@ -114,7 +114,7 @@ protected function tearDown() {
public function testMigrateUpgrade() {
$connection_options = $this->sourceDatabase->getConnectionOptions();
$this->drupalGet('/upgrade');
$this->assertSession()->responseContains('Upgrade a site by importing its database and files into a clean and empty new install of Drupal 8.');
$this->assertSession()->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, [], t('Continue'));
$this->assertText('Provide credentials for the database of the Drupal site you want to upgrade.');
......@@ -163,7 +163,7 @@ public function testMigrateUpgrade() {
// Restart the upgrade process.
$this->drupalGet('/upgrade');
$this->assertSession()->responseContains('Upgrade a site by importing its database and files into a clean and empty new install of Drupal 8.');
$this->assertSession()->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, [], t('Continue'));
$this->assertSession()->pageTextContains('Provide credentials for the database of the Drupal site you want to upgrade.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment