protected function UpdateTestBase::refreshUpdateStatus in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/update/src/Tests/UpdateTestBase.php \Drupal\update\Tests\UpdateTestBase::refreshUpdateStatus()
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
Drupal\update_test\Controller\UpdateTestController::updateTest()
14 calls to UpdateTestBase::refreshUpdateStatus()
- UpdateContribTest::testHookUpdateStatusAlter in core/
modules/ update/ src/ Tests/ UpdateContribTest.php - Checks that hook_update_status_alter() works to change a status.
- UpdateContribTest::testNoReleasesAvailable in core/
modules/ update/ src/ Tests/ UpdateContribTest.php - Tests when there is no available release data for a contrib module.
- UpdateContribTest::testUpdateBaseThemeSecurityUpdate in core/
modules/ update/ src/ Tests/ UpdateContribTest.php - Tests that subthemes are notified about security updates for base themes.
- UpdateContribTest::testUpdateBrokenFetchURL in core/
modules/ update/ src/ Tests/ UpdateContribTest.php - Makes sure that if we fetch from a broken URL, sane things happen.
- UpdateContribTest::testUpdateContribBasic in core/
modules/ update/ src/ Tests/ UpdateContribTest.php - Tests the basic functionality of a contrib module on the status report.
File
- core/
modules/ update/ src/ Tests/ UpdateTestBase.php, line 68 - Contains \Drupal\update\Tests\UpdateTestBase.
Class
- UpdateTestBase
- Defines some shared functions used by all update tests.
Namespace
Drupal\update\TestsCode
protected function refreshUpdateStatus($xml_map, $url = 'update-test') {
// Tell the Update Manager module to fetch from the URL provided by
// update_test module.
$this
->config('update.settings')
->set('fetch.url', Url::fromUri('base:' . $url, array(
'absolute' => TRUE,
))
->toString())
->save();
// Save the map for UpdateTestController::updateTest() to use.
$this
->config('update_test.settings')
->set('xml_map', $xml_map)
->save();
// Manually check the update status.
$this
->drupalGet('admin/reports/updates/check');
}