protected function DrupalWebTestCase::refreshVariables
Refresh the in-memory set of variables. Useful after a page request is made that changes a variable in a different thread.
In other words calling a settings page with $this->drupalPost() with a changed value would update a variable to reflect that change, but in the thread that made the call (thread running the test) the changed variable would not be picked up.
This method clears the variables cache and loads a fresh copy from the database to ensure that the most up-to-date set of variables is loaded.
32 calls to DrupalWebTestCase::refreshVariables()
- DrupalMatchPathTestCase::setUp in drupal-7.x/
modules/ simpletest/ tests/ path.test - Sets up a Drupal site for running functional and integration tests.
- DrupalMatchPathTestCase::setUp in drupal-7.x/
modules/ simpletest/ tests/ path.test - Sets up a Drupal site for running functional and integration tests.
- DrupalWebTestCase::drupalGet in drupal-7.x/
modules/ simpletest/ drupal_web_test_case.php - Retrieves a Drupal path or an absolute path.
- DrupalWebTestCase::drupalGet in drupal-7.x/
modules/ simpletest/ drupal_web_test_case.php - Retrieves a Drupal path or an absolute path.
- DrupalWebTestCase::drupalHead in drupal-7.x/
modules/ simpletest/ drupal_web_test_case.php - Retrieves only the headers for a Drupal path or an absolute path.
1 method overrides DrupalWebTestCase::refreshVariables()
- UpgradePathTestCase::refreshVariables in drupal-7.x/
modules/ simpletest/ tests/ upgrade/ upgrade.test - Specialized refreshVariables().
Archivo
- drupal-7.x/
modules/ simpletest/ drupal_web_test_case.php, line 1592
Class
- DrupalWebTestCase
- Test case for typical Drupal tests.
Código
protected function refreshVariables() {
global $conf;
cache_clear_all('variables', 'cache_bootstrap');
$conf = variable_initialize();
}