### Eclipse Workspace Patch 1.0
#P simpletest
Index: tests/functional/node.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/node.test,v
retrieving revision 1.11
diff -u -r1.11 node.test
--- tests/functional/node.test	1 Apr 2008 23:33:54 -0000	1.11
+++ tests/functional/node.test	10 Apr 2008 00:36:26 -0000
@@ -272,7 +272,7 @@
   function testPageEdit() {
 
     /* Prepare settings */
-    $this->drupalVariableSet('node_options_page', array('status', 'promote'));
+    variable_set('node_options_page', array('status', 'promote'));
     /* Prepare a user to do the stuff */
     $web_user = $this->drupalCreateUser(array('edit own page content', 'create page content'));
     $this->drupalLogin($web_user);
@@ -321,7 +321,7 @@
 
   function testPagePreview() {
     /* Prepare settings */
-    $this->drupalVariableSet('node_options_page', array('status', 'promote'));
+    variable_set('node_options_page', array('status', 'promote'));
     /* Prepare a user to do the stuff */
     $web_user = $this->drupalCreateUser(array('edit own page content', 'create page content'));
     $this->drupalLogin($web_user);
@@ -357,7 +357,7 @@
 
   function testPageCreation() {
     /* Prepare settings */
-    $this->drupalVariableSet('node_options_page', array('status', 'promote'));
+    variable_set('node_options_page', array('status', 'promote'));
 
     /* Prepare a user to do the stuff */
     $web_user = $this->drupalCreateUser(array('edit own page content', 'create page content'));
Index: tests/functional/book.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/book.test,v
retrieving revision 1.11
diff -u -r1.11 book.test
--- tests/functional/book.test	5 Apr 2008 19:19:26 -0000	1.11
+++ tests/functional/book.test	10 Apr 2008 00:36:25 -0000
@@ -128,7 +128,7 @@
    */
   function createBookNode($book_nid, $parent = NULL) {
     static $number = 0; // Used to ensure that when sorted nodes stay in same order.
-    $this->drupalVariableSet('node_options_page', array('status', 'promote'));
+    variable_set('node_options_page', array('status', 'promote'));
 
     $edit = array();
     $edit['title'] = $number . ' - SimpleTest test node ' . $this->randomName(10);
Index: tests/functional/comment.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/comment.test,v
retrieving revision 1.15
diff -u -r1.15 comment.test
--- tests/functional/comment.test	5 Apr 2008 19:19:26 -0000	1.15
+++ tests/functional/comment.test	10 Apr 2008 00:36:26 -0000
@@ -309,7 +309,7 @@
    * @param string $message Status message to display.
    */
   function setCommentSettings($name, $value, $message) {
-    $this->drupalVariableSet($name .'_story', $value);
+    variable_set($name .'_story', $value);
     $this->assertTrue(TRUE, t($message)); // Display status message.
   }
 
Index: tests/functional/translation.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/translation.test,v
retrieving revision 1.11
diff -u -r1.11 translation.test
--- tests/functional/translation.test	10 Apr 2008 00:27:48 -0000	1.11
+++ tests/functional/translation.test	10 Apr 2008 00:36:27 -0000
@@ -111,7 +111,7 @@
    * @param string $language Langauge code.
    */
   function createPage($title, $body, $language) {
-    $this->drupalVariableSet('node_options_page', array('status', 'promote'));
+    variable_set('node_options_page', array('status', 'promote'));
 
     $edit = array();
     $edit['title'] = $title;
Index: tests/functional/search.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/search.test,v
retrieving revision 1.9
diff -u -r1.9 search.test
--- tests/functional/search.test	9 Apr 2008 19:27:24 -0000	1.9
+++ tests/functional/search.test	10 Apr 2008 00:36:27 -0000
@@ -34,7 +34,7 @@
    * Set up a small index of items to test against.
    */
   function _setup() {
-    $this->drupalVariableSet('minimum_word_size', 3);
+    variable_set('minimum_word_size', 3);
 
     for ($i = 1; $i <= 7; ++$i) {
       search_index($i, SEARCH_TYPE, $this->getText($i));
Index: tests/functional/path.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/path.test,v
retrieving revision 1.9
diff -u -r1.9 path.test
--- tests/functional/path.test	5 Apr 2008 19:19:26 -0000	1.9
+++ tests/functional/path.test	10 Apr 2008 00:36:26 -0000
@@ -125,7 +125,7 @@
   }
 
   function createNode() {
-    $this->drupalVariableSet('node_options_page', array('status', 'promote'));
+    variable_set('node_options_page', array('status', 'promote'));
 
     $edit = array();
     $edit['title'] = '!SimpleTest test node! ' . $this->randomName(10);
Index: tests/functional/user.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/user.test,v
retrieving revision 1.10
diff -u -r1.10 user.test
--- tests/functional/user.test	1 Apr 2008 23:33:54 -0000	1.10
+++ tests/functional/user.test	10 Apr 2008 00:36:27 -0000
@@ -12,7 +12,7 @@
 
   function testUserRegistration() {
     /* We first allow every user to login instantly. */
-    $this->drupalVariableSet('user_register', 1);
+    variable_set('user_register', 1);
 
     /* make sure the profile module is disabled to avoid conflicts */
     $this->drupalModuleDisable('profile');
@@ -183,7 +183,7 @@
 
   function testAccess() {
     /* To avoid conflicts with non allowed account creations */
-    $this->drupalVariableSet('user_register', 1);
+    variable_set('user_register', 1);
 
     $this->addMask('simpletest_block%', 'user');
     $this->addMask('simpletest_block_allow%', 'user', 1);
@@ -236,7 +236,7 @@
 
   function testUserRegistration() {
     /* We first allow every user to login instantly. */
-    $this->drupalVariableSet('user_register', 1);
+    variable_set('user_register', 1);
 
     /* make sure the profile module is disabled to avoid conflicts */
     $this->drupalModuleDisable('profile');
Index: tests/functional/profile.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/tests/functional/profile.test,v
retrieving revision 1.8
diff -u -r1.8 profile.test
--- tests/functional/profile.test	1 Apr 2008 23:33:54 -0000	1.8
+++ tests/functional/profile.test	10 Apr 2008 00:36:26 -0000
@@ -503,7 +503,7 @@
   }
 
   function testProfileSingle() {
-    $this->drupalVariableSet('user_register',1);
+    variable_set('user_register',1);
     $this->drupalModuleEnable('profile');
     // create test user
     $edit['name'] = 'Profile '. $this->randomName(5);
Index: drupal_test_case.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/drupal_test_case.php,v
retrieving revision 1.84
diff -u -r1.84 drupal_test_case.php
--- drupal_test_case.php	9 Apr 2008 22:45:34 -0000	1.84
+++ drupal_test_case.php	10 Apr 2008 00:36:25 -0000
@@ -217,21 +217,6 @@
   }
 
   /**
-   * Set a drupal variable in the test environment. Any variable settings that deviate
-   * from the default need to be set in the test.
-   *
-   * @param string $name Name of the variable to set.
-   * @param mixed $value Value to set.
-   */
-  function drupalVariableSet($name, $value) {
-    /* NULL variables would anyways result in default because of isset */
-    $old_value = variable_get($name, NULL);
-    if ($value !== $old_value) {
-      variable_set($name, $value);
-    }
-  }
-
-  /**
    * Create a user with a given set of permissions. The permissions correspond to the
    * names given on the privileges page.
    *
