function UpdateTestBase::refreshUpdateStatus
Same name in this branch
- 8.9.x core/modules/update/src/Tests/UpdateTestBase.php \Drupal\update\Tests\UpdateTestBase::refreshUpdateStatus()
Same name and namespace in other branches
- 11.x core/modules/update/tests/src/Functional/UpdateTestBase.php \Drupal\Tests\update\Functional\UpdateTestBase::refreshUpdateStatus()
- 10 core/modules/update/tests/src/Functional/UpdateTestBase.php \Drupal\Tests\update\Functional\UpdateTestBase::refreshUpdateStatus()
- 9 core/modules/update/tests/src/Functional/UpdateTestBase.php \Drupal\Tests\update\Functional\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()
9 calls to UpdateTestBase::refreshUpdateStatus()
- UpdateCoreTest::testDatestampMismatch in core/
modules/ update/ tests/ src/ Functional/ UpdateCoreTest.php - Ensures proper results where there are date mismatches among modules.
- UpdateCoreTest::testMajorUpdateAvailable in core/
modules/ update/ tests/ src/ Functional/ UpdateCoreTest.php - Tests the Update Manager module when a major update is available.
- UpdateCoreTest::testNormalUpdateAvailable in core/
modules/ update/ tests/ src/ Functional/ UpdateCoreTest.php - Tests the Update Manager module when one normal update is available.
- UpdateCoreTest::testNoUpdatesAvailable in core/
modules/ update/ tests/ src/ Functional/ UpdateCoreTest.php - Tests the Update Manager module when no updates are available.
- UpdateCoreTest::testRevokedRelease in core/
modules/ update/ tests/ src/ Functional/ UpdateCoreTest.php - Tests messages when a project release is unpublished.
File
-
core/
modules/ update/ tests/ src/ Functional/ UpdateTestBase.php, line 93
Class
- UpdateTestBase
- Defines some shared functions used by all update tests.
Namespace
Drupal\Tests\update\FunctionalCode
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, [
'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');
$this->clickLink(t('Check manually'));
$this->checkForMetaRefresh();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.