UpdateTestUploadCase::testUpdateManagerCoreSecurityUpdateMessages

7 update.test UpdateTestUploadCase::testUpdateManagerCoreSecurityUpdateMessages()
8 update.test UpdateTestUploadCase::testUpdateManagerCoreSecurityUpdateMessages()

Check the messages on Update manager pages when missing a security update.

File

modules/update/update.test, line 689
Tests for update.module.

Code

function testUpdateManagerCoreSecurityUpdateMessages() {
  $setting = array(
    '#all' => array(
      'version' => '7.0',
    ),
  );
  variable_set('update_test_system_info', $setting);
  variable_set('update_fetch_url', url('update-test', array('absolute' => TRUE)));
  variable_set('update_test_xml_map', array('drupal' => '2-sec'));
  // Initialize the update status.
  $this->drupalGet('admin/reports/updates');

  // Now, make sure none of the Update manager pages have duplicate messages
  // about core missing a security update.

  $this->drupalGet('admin/modules/install');
  $this->assertNoText(t('There is a security update available for your version of Drupal.'));

  $this->drupalGet('admin/modules/update');
  $this->assertNoText(t('There is a security update available for your version of Drupal.'));

  $this->drupalGet('admin/appearance/install');
  $this->assertNoText(t('There is a security update available for your version of Drupal.'));

  $this->drupalGet('admin/appearance/update');
  $this->assertNoText(t('There is a security update available for your version of Drupal.'));

  $this->drupalGet('admin/reports/updates/install');
  $this->assertNoText(t('There is a security update available for your version of Drupal.'));

  $this->drupalGet('admin/reports/updates/update');
  $this->assertNoText(t('There is a security update available for your version of Drupal.'));

  $this->drupalGet('admin/update/ready');
  $this->assertNoText(t('There is a security update available for your version of Drupal.'));
}
Login or register to post comments