You are here

protected function UpdateTestHelper::refreshUpdateStatus in Drupal 7

Refreshes the update status based on the desired available update scenario.

Parameters

$xml_map: Array that maps project names to availability scenarios to fetch. The key '#all' is used if a project-specific mapping is not defined.

$url: (optional) A string containing the URL to fetch update data from. Defaults to 'update-test'.

See also

update_test_mock_page()

13 calls to UpdateTestHelper::refreshUpdateStatus()
UpdateCoreTestCase::testDatestampMismatch in modules/update/update.test
Ensures proper results where there are date mismatches among modules.
UpdateCoreTestCase::testNormalUpdateAvailable in modules/update/update.test
Tests the Update Manager module when one normal update is available.
UpdateCoreTestCase::testNoUpdatesAvailable in modules/update/update.test
Tests the Update Manager module when no updates are available.
UpdateCoreTestCase::testSecurityUpdateAvailable in modules/update/update.test
Tests the Update Manager module when a security update is available.
UpdateCoreTestCase::testServiceUnavailable in modules/update/update.test
Tests the Update Manager module when the update server returns 503 errors.

... See full list

File

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

Class

UpdateTestHelper
Defines some shared functions used by all update tests.

Code

protected function refreshUpdateStatus($xml_map, $url = 'update-test') {

  // Tell the Update Manager module to fetch from the URL provided by
  // update_test module.
  variable_set('update_fetch_url', url($url, array(
    'absolute' => TRUE,
  )));

  // Save the map for update_test_mock_page() to use.
  variable_set('update_test_xml_map', $xml_map);

  // Manually check the update status.
  $this
    ->drupalGet('admin/reports/updates/check');
}