1 installer.test InstallerTestUploadCase::testUpdateManagerCoreSecurityUpdateMessages()

Checks the messages on update manager pages when missing a security update.

File

core/modules/installer/tests/installer.test, line 252

Class

InstallerTestUploadCase

Code

function testUpdateManagerCoreSecurityUpdateMessages() {
  $config = config('update.settings');
  $setting = array(
    '#all' => array(
      'version' => '1.0',
    ),
  );
  $config->set('update_system_info', $setting)->save();
  $config->set('update_url', url('update-test', array('absolute' => TRUE)))->save();
  state_set('update_test_xml_map', array('backdrop' => '2-sec'));
  // Initialize the update status.
  $this->backdropGet('admin/reports/updates');

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

  $this->backdropGet('admin/installer/manual');
  $this->assertNoText(t('There is a security update available for your version of Backdrop.'));

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

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

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

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

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

  $this->backdropGet('admin/update/ready');
  $this->assertNoText(t('There is a security update available for your version of Backdrop.'));
}