diff --git a/core/modules/simpletest/simpletest.test b/core/modules/simpletest/simpletest.test
index 716b36e..1b80f9f 100644
--- a/core/modules/simpletest/simpletest.test
+++ b/core/modules/simpletest/simpletest.test
@@ -619,3 +619,64 @@ class SimpleTestMissingCheckedRequirements extends DrupalWebTestCase {
     }
   }
 }
+
+/**
+ * Tests setup, reset, and refresh of testing environment parameters.
+ */
+class SimpleTestEnvironmentTestCase extends DrupalWebTestCase {
+  protected $profile = 'testing';
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Environment',
+      'description' => 'Tests setup, reset, and refresh of testing environment parameters.',
+      'group' => 'SimpleTest',
+    );
+  }
+
+  /**
+   * Tests proper refreshing of system variables.
+   */
+  function testRefreshVariables() {
+    global $conf;
+
+    // Verify that the initial site_name variable is identical to the value in
+    // $conf.
+    // @todo setUp() does not configure a site_name; albeit required by Drupal installer normally...
+    debug(variable_get('site_name', ''));
+    $original_site_name = $conf['site_name'];
+    $this->assertEqual($original_site_name, variable_get('site_name', ''), 'Initial site_name variable found.');
+
+    $this->admin_user = $this->drupalCreateUser(array('administer site configuration'));
+    $this->drupalLogin($this->admin_user);
+
+    // Change the site_name variable in the child site.
+    $new_site_name = $this->randomName();
+    $edit = array(
+      'site_name' => $new_site_name,
+      // Front page path 'node' is invalid in testing profile, but the default value...
+      'site_frontpage' => 'user',
+    );
+    $this->drupalPost('admin/config/system/site-information', $edit, t('Save configuration'));
+
+    // Verify that site_name variable in parent site is outdated.
+    $this->assertEqual($conf['site_name'], $original_site_name);
+    $this->assertEqual(variable_get('site_name', ''), $original_site_name);
+
+    // Verify that a variable defined in settings.php exists.
+    // @todo setUp() does not read settings.php either... (?)
+    debug($conf);
+    $this->assertTrue(isset($conf['databases']), '$conf contains databases.');
+
+    // Refresh variables in parent site.
+    $this->refreshVariables();
+
+    // Verify that site_name variable in parent site is outdated.
+    $this->assertEqual($conf['site_name'], $new_site_name);
+    $this->assertEqual(variable_get('site_name', ''), $new_site_name);
+
+    // Verify that a variable defined in settings.php still exists.
+    $this->assertTrue(isset($conf['databases']), '$conf contains databases.');
+  }
+}
+
