You are here

function UpdateCoreTestCase::testModulePageRegularUpdate in Drupal 7

Checks the messages at admin/modules when an update is missing.

File

modules/update/update.test, line 177
This file contains tests for the Update Manager module.

Class

UpdateCoreTestCase
Tests behavior related to discovering and listing updates to Drupal core.

Code

function testModulePageRegularUpdate() {
  $this
    ->setSystemInfo7_0();

  // Instead of using refreshUpdateStatus(), set these manually.
  variable_set('update_fetch_url', url('update-test', array(
    'absolute' => TRUE,
  )));
  variable_set('update_test_xml_map', array(
    'drupal' => '1',
  ));
  $this
    ->drupalGet('admin/reports/updates');
  $this
    ->clickLink(t('Check manually'));
  $this
    ->assertText(t('Checked available update data for one project.'));
  $this
    ->drupalGet('admin/modules');
  $this
    ->assertText(t('There are updates available for your version of Drupal.'));
  $this
    ->assertNoText(t('There is a security update available for your version of Drupal.'));
}