1 update.test protected UpdateTestHelper::refreshUpdateStatus($xml_map, $url = 'update-test')

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()

File

core/modules/update/tests/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') {
  $config = config('update.settings');
  // Tell the Update Manager module to fetch from the URL provided by
  // update_test module.
  $config->set('update_url', url($url, array('absolute' => TRUE)))->save();
  // Save the map for update_test_mock_page() to use.
  state_set('update_test_xml_map', $xml_map);
  // Manually check the update status.
  $this->backdropGet('admin/reports/updates/check');
}