function UpdateUploadTest::testUpdateManagerCoreSecurityUpdateMessages

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

File

drupal/core/modules/update/lib/Drupal/update/Tests/UpdateUploadTest.php, line 78
Definition of Drupal\update\Tests\UpdateUploadTest.

Class

UpdateUploadTest
Tests project upload and extract functionality.

Namespace

Drupal\update\Tests

Code

function testUpdateManagerCoreSecurityUpdateMessages() {
  $setting = array(
    '#all' => array(
      'version' => '7.0',
    ),
  );
  config('update_test.settings')
    ->set('system_info', $setting)
    ->set('xml_map', array(
    'drupal' => '2-sec',
  ))
    ->save();
  config('update.settings')
    ->set('fetch.url', url('update-test', array(
    'absolute' => TRUE,
  )))
    ->save();

  // 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.'));
}