function UpdateScriptFunctionalTest::testThemeSystem

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

File

drupal/modules/system/system.test, line 2536
Tests for system.module.

Class

UpdateScriptFunctionalTest
Tests for the update system functionality.

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 = db_query("SELECT * FROM {system} WHERE type = 'theme' ORDER BY name")
    ->fetchAll();
  $this
    ->drupalLogin($this->update_user);
  $this
    ->drupalGet($this->update_url, array(
    'external' => TRUE,
  ));
  $final_theme_data = db_query("SELECT * FROM {system} WHERE type = 'theme' ORDER BY name")
    ->fetchAll();
  $this
    ->assertEqual($original_theme_data, $final_theme_data, 'Visiting update.php does not alter the information about themes stored in the database.');
}