You are here

function UpdateScriptTest::testThemeSystem in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Update/UpdateScriptTest.php \Drupal\system\Tests\Update\UpdateScriptTest::testThemeSystem()

Tests the effect of using the update script on the theme system.

File

core/modules/system/src/Tests/Update/UpdateScriptTest.php, line 135
Contains \Drupal\system\Tests\Update\UpdateScriptTest.

Class

UpdateScriptTest
Tests the update script access and functionality.

Namespace

Drupal\system\Tests\Update

Code

function testThemeSystem() {

  // Since visiting update.php triggers a rebuild of the theme system from an
  // unusual maintenance mode environment, we check that this rebuild did not
  // put any incorrect information about the themes into the database.
  $original_theme_data = $this
    ->config('core.extension')
    ->get('theme');
  $this
    ->drupalLogin($this->updateUser);
  $this
    ->drupalGet($this->updateUrl, [
    'external' => TRUE,
  ]);
  $final_theme_data = $this
    ->config('core.extension')
    ->get('theme');
  $this
    ->assertEqual($original_theme_data, $final_theme_data, 'Visiting update.php does not alter the information about themes stored in the database.');
}