Index: modules/simpletest/tests/bootstrap.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/bootstrap.test,v
retrieving revision 1.1
diff -u -r1.1 bootstrap.test
--- modules/simpletest/tests/bootstrap.test	14 Aug 2008 09:18:28 -0000	1.1
+++ modules/simpletest/tests/bootstrap.test	4 Sep 2008 20:55:18 -0000
@@ -108,3 +108,47 @@
   }
 
 }
+
+class BootstrapVariableTestCase extends DrupalWebTestCase {
+
+  /**
+   * Implementation of getInfo().
+   */
+  function getInfo() {
+    return array(
+      'name' => t('Variable test'),
+      'description' => t('Make sure the variable system functions correctly.'),
+      'group' => t('Bootstrap')
+    );
+  }
+
+  /**
+   * testVariable
+   */
+  function testVariable() {
+    // Setting and retrieving values
+    $variable = 123456789;
+    variable_set('simpletest_bootstrap_variable_test', $variable);
+    $variable = variable_get('simpletest_bootstrap_variable_test', NULL);
+    $this->assertTrue(
+      $variable === 123456789,
+      t('Setting and retrieving values')
+    );
+    
+    // Values are saved in the database correctly
+    $variable = db_fetch_object(db_query("SELECT value FROM {variable} WHERE name = '%s'", 'simpletest_bootstrap_variable_test'));
+    $this->assertTrue(
+      isset($variable->value) ? (unserialize($variable->value) === 123456789) : FALSE,
+      t('Values are saved in the database correctly')
+    );
+    
+    // Deleting variables
+    variable_del('simpletest_bootstrap_variable_test');
+    $variable = variable_get('simpletest_bootstrap_variable_test', 1234);
+    $this->assertTrue(
+      $variable === 1234,
+      t('Deleting variables')
+    );
+  }
+
+}
