Index: drupal_test_case.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/drupal_test_case.php,v
retrieving revision 1.53
diff -u -p -r1.53 drupal_test_case.php
--- drupal_test_case.php	19 Feb 2008 13:52:05 -0000	1.53
+++ drupal_test_case.php	2 Mar 2008 22:13:50 -0000
@@ -27,21 +27,21 @@ class DrupalTestCase extends WebTestCase
     }
     $this->WebTestCase($label);
   }
-  
+
   /**
    * Creates a node based on default settings.
    *
    * @param settings An array of settings to change from the defaults, in the form of 'body' => 'Hello, world!'
    */
   function drupalCreateNode($settings = array()) {
- 
+
     // Populate defaults array
     $defaults = array(
       'body'      => $this->randomName(32),
       'title'     => $this->randomName(8),
       'comment'   => 2,
       'changed'   => time(),
-      'format'    => 1,
+      'format'    => FILTER_FORMAT_DEFAULT,
       'moderate'  => 0,
       'promote'   => 0,
       'revision'  => 1,
@@ -55,16 +55,16 @@ class DrupalTestCase extends WebTestCase
     $defaults['teaser'] = $defaults['body'];
     // If we already have a node, we use the original node's created time, and this
     $defaults['date'] = format_date($defaults['created'], 'custom', 'Y-m-d H:i:s O');
-    
+
     if (empty($settings['uid'])) {
       global $user;
       $defaults['uid'] = $user->uid;
     }
     $node = ($settings + $defaults);
     $node = (object)$node;
- 
+
     node_save($node);
-    
+
     // small hack to link revisions to our test user
     db_query('UPDATE {node_revisions} SET uid = %d WHERE vid = %d', $node->uid, $node->vid);
     $this->_cleanupNodes[] = $node->nid;
@@ -281,7 +281,7 @@ class DrupalTestCase extends WebTestCase
       $this->_modules[$name] = $name;
       $form_state['values'] = array('status' => $this->_modules, 'op' => t('Save configuration'));
       drupal_execute('system_modules', $form_state);
-      
+
       //rebuilding all caches
       drupal_rebuild_theme_registry();
       node_types_rebuild();
@@ -307,7 +307,7 @@ class DrupalTestCase extends WebTestCase
       unset($this->_modules[$key]);
       $form_state['values'] = array('status' => $this->_modules, 'op' => t('Save configuration'));
       drupal_execute('system_modules', $form_state);
-      
+
       //rebuilding all caches
       drupal_rebuild_theme_registry();
       node_types_rebuild();
@@ -329,7 +329,7 @@ class DrupalTestCase extends WebTestCase
       $this->_modules = $this->_originalModules;
     }
   }
-  
+
   /**
    * Set a drupal variable and keep track of the changes for tearDown()
    * @param string $name name of the value
@@ -444,15 +444,15 @@ class DrupalTestCase extends WebTestCase
     if ($this->_modules != $this->_originalModules) {
       $form_state['values'] = array('status' => $this->_originalModules, 'op' => t('Save configuration'));
       drupal_execute('system_modules', $form_state);
-      
+
       //rebuilding all caches
       drupal_rebuild_theme_registry();
       node_types_rebuild();
       menu_rebuild();
       cache_clear_all('schema', 'cache');
       module_rebuild_cache();
-    
-      $this->_modules = $this->_originalModules; 
+
+      $this->_modules = $this->_originalModules;
     }
 
     foreach ($this->_cleanupVariables as $name => $value) {
@@ -463,7 +463,7 @@ class DrupalTestCase extends WebTestCase
       }
     }
     $this->_cleanupVariables = array();
-    
+
     //delete nodes
     foreach ($this->_cleanupNodes as $nid) {
       node_delete($nid);
