Tests a successful major version release upgrade.
public function testBasicMinimalUpgrade() {
$this
->assertTrue($this
->performUpgrade(), 'The upgrade was completed successfully.');
// Hit the frontpage.
$this
->drupalGet('');
$this
->assertResponse(200);
// Verify that we are still logged in.
$this
->finishUpgradeSession();
$this
->drupalLogin((object) array(
'uid' => 1,
'name' => 'admin',
'pass_raw' => 'drupal',
));
// The previous login should've triggered a password rehash, so login one
// more time to make sure the new hash is readable.
$this
->drupalLogout();
$this
->drupalLogin((object) array(
'uid' => 1,
'name' => 'admin',
'pass_raw' => 'drupal',
));
// Test that the site name is correctly displayed.
$this
->assertText('drupal', 'The site name is correctly displayed.');
// Verify that the main admin sections are available.
$this
->drupalGet('admin');
$this
->assertText(t('Content'));
$this
->assertText(t('Appearance'));
$this
->assertText(t('People'));
$this
->assertText(t('Configuration'));
$this
->assertText(t('Reports'));
$this
->assertText(t('Structure'));
$this
->assertText(t('Extend'));
// Confirm that no {menu_links} entry exists for user/autocomplete.
$result = db_query('SELECT COUNT(*) FROM {menu_links} WHERE link_path = :user_autocomplete', array(
':user_autocomplete' => 'user/autocomplete',
))
->fetchField();
$this
->assertFalse($result, 'No {menu_links} entry exists for user/autocomplete');
// Verify that all required modules are enabled.
$enabled = $this->container
->get('module_handler')
->getModuleList();
$required = array_filter(system_rebuild_module_data(), function ($data) {
return !empty($data->info['required']);
});
$this
->assertEqual(array_diff_key($required, $enabled), array());
// Verify that image.module was correctly installed.
$this
->assertEqual('thumbnail', config('image.style.thumbnail')
->get('name'));
// Make sure that the default mail configuration has been converted.
$this
->assertEqual(array(
'default' => 'Drupal\\Core\\Mail\\PhpMail',
), config('system.mail')
->get('interface'), 'Default mail configuration set.');
}