? minorfixes.patch
? simpletest
? tests/.bzr
? tests/AggregatorFeedAdd.test
? tests/enable_modules.test
? tests/menu_enable.patch
? tests/menu_tests.patch
? tests/user_module.test
? tests/user_tests.patch
Index: drupal_test_case.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/drupal_test_case.php,v
retrieving revision 1.34
diff -u -p -r1.34 drupal_test_case.php
--- drupal_test_case.php	23 Sep 2007 08:35:23 -0000	1.34
+++ drupal_test_case.php	28 Dec 2007 22:23:24 -0000
@@ -24,13 +24,13 @@ class DrupalTestCase extends WebTestCase
     }
     $this->WebTestCase($label);
   }
-  
+
   /**
-   * @abstract Checks to see if we need to send 
+   * @abstract Checks to see if we need to send
    * a http-auth header to authenticate
    * when browsing a site.
    *
-   * @param status Boolean pass true if you want to know if we are using 
+   * @param status Boolean pass true if you want to know if we are using
    * HTTP-AUTH
    * @return void
    */
@@ -40,35 +40,34 @@ class DrupalTestCase extends WebTestCase
       return $check;
     }
     if( variable_get('simpletest_httpauth', false) ) {
-      $html = $this->authenticate( variable_get('simpletest_httpauth_username', ''), variable_get('simpletest_httpauth_pass', '') );
+      $html = $this->authenticate(variable_get('simpletest_httpauth_username', ''), variable_get('simpletest_httpauth_pass', ''));
     }
     return $html;
   }
 
   /**
-   * @abstract Brokder for the get function
-   * addes the authetnication headers if 
-   * neccessary
+   * @abstract Broker for the get function
+   * adds the authentication headers if neccessary
    * @author Earnest Berry III <earnest.berry@gmail.com>
    *
-   * @param url string Url to retch
+   * @param url URL to fetch
    * @return void
    */
   function drupalGet($url) {
     $html = $this->_browser->get($url);
-    
-    if( $this->drupalCheckAuth(true) ) {
+
+    if ($this->drupalCheckAuth(true)) {
       $html .= $this->drupalCheckAuth();
     }
-    
+
     $this->_content = $this->_browser->getContent();
-    
+
     return $html;
   }
 
   /**
    * @abstract Brokder for the post function
-   * addes the authetnication headers if 
+   * addes the authetnication headers if
    * neccessary
    * @author Earnest Berry III <earnest.berry@gmail.com>
    *
@@ -77,17 +76,17 @@ class DrupalTestCase extends WebTestCase
    */
   function drupalRawPost($action, $edit = array()) {
     $html = $this->_browser->post($action, $edit);
-    
+
     if( $this->drupalCheckAuth(true) ) {
       $html .= $this->drupalCheckAuth();
     }
-    
+
     $this->_content = $this->_browser->getContent();
-    
+
     return $html;
   }
 
-  
+
 
   /**
    * Do a post request on a drupal page.
@@ -109,7 +108,7 @@ class DrupalTestCase extends WebTestCase
           || $this->_browser->setFieldById("edit-$field_name", $field_value);
       $this->assertTrue($ret, " [browser] Setting $field_name=\"$field_value\"");
     }
-    
+
     $ret = $this->_browser->clickSubmit(t($submit))  || $this->_browser->clickSubmitByName($submit) || $this->_browser->clickImageByName($submit);
 //    $ret = $this->_browser->clickSubmitByName('op');
     $this->assertTrue($ret, ' [browser] POST by click on ' . t($submit));
@@ -117,13 +116,13 @@ class DrupalTestCase extends WebTestCase
   }
 
   /**
-   *    Follows a link by name. Will click the first link
-   *    found with this link text by default, or a later
-   *    one if an index is given. Match is case insensitive
-   *    with normalised space.
-   *    Does make assertations if the click was sucessful or not
-   *    and it does translate label.
-   *    WARNING: Assertation fails on empty ("") output from the clicked link
+   *    Follows a link by name.
+   *
+   *    Will click the first link found with this link text by default, or a
+   *    later one if an index is given. Match is case insensitive with
+   *    normalized space. The label is translated label. There is an assert
+   *    for successful click.
+   *    WARNING: Assertion fails on empty ("") output from the clicked link
    *
    *    @param string $label      Text between the anchor tags.
    *    @param integer $index     Link position counting from zero.
@@ -158,7 +157,7 @@ class DrupalTestCase extends WebTestCase
   /**
    * Generates a random string, to be used as name or whatever
    * @param integer $number   number of characters
-   * @return ransom string
+   * @return random string
    */
   function randomName($number = 4, $prefix = 'simpletest_') {
     $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_';
@@ -196,9 +195,9 @@ class DrupalTestCase extends WebTestCase
       }
       $this->pass(" [module] $name enabled");
       return TRUE;
-    } 
+    }
     else {
-      $this->fail(" [module] $name could not be enbled, probably file not exists");
+      $this->fail(" [module] $name could not be enabled, probably file not exists");
       return FALSE;
     }
   }
@@ -232,7 +231,7 @@ class DrupalTestCase extends WebTestCase
 
 
   /**
-   * Set a druapl variable and keep track of the changes for tearDown()
+   * Set a drupal variable and keep track of the changes for tearDown()
    * @param string $name name of the value
    * @param mixed  $value value
    */
@@ -326,7 +325,7 @@ class DrupalTestCase extends WebTestCase
     if ($user === NULL) {
       $user = $this->drupalCreateUserRolePerm();
     }
-    
+
     $edit = array('name' => $user->name, 'pass' => $user->pass_raw);
     $this->drupalPostRequest('user', $edit, $submit);
 
@@ -341,7 +340,7 @@ class DrupalTestCase extends WebTestCase
    * tearDown implementation, setting back switched modules etc
    */
   function tearDown() {
-    
+
     foreach ($this->_cleanupModules as $name => $status) {
       db_query("UPDATE {system} SET status = %d WHERE name = '%s' AND type = 'module'", $status, $name);
     }
@@ -376,7 +375,7 @@ class DrupalTestCase extends WebTestCase
       }
       user_delete(array(), $uid);
     }
-    
+
     //Output drupal warnings and messages into assert messages
     $drupal_msgs = drupal_get_messages();
     foreach($drupal_msgs as $type => $msgs) {
@@ -384,7 +383,7 @@ class DrupalTestCase extends WebTestCase
         $this->assertTrue(TRUE, "$type: $msg");
       }
     }
-    
+
     parent::tearDown();
   }
 
@@ -402,7 +401,7 @@ class DrupalTestCase extends WebTestCase
     array_pop($reporter->test_info_stack);
   }
 
-  
+
         /**
          *    Will trigger a pass if the raw text is found on the loaded page
          *    Fail otherwise.
@@ -418,7 +417,7 @@ class DrupalTestCase extends WebTestCase
                   $message);
         }
 
-          
+
         /**
          *    Will trigger a pass if the raw text is NOT found on the loaded page
          *    Fail otherwise.
Index: drupal_unit_tests.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/drupal_unit_tests.php,v
retrieving revision 1.8
diff -u -p -r1.8 drupal_unit_tests.php
--- drupal_unit_tests.php	29 Nov 2007 10:07:07 -0000	1.8
+++ drupal_unit_tests.php	28 Dec 2007 22:23:24 -0000
@@ -8,7 +8,7 @@ class DrupalTestSuite extends TestSuite 
   function DrupalTestSuite($label) {
     $this->TestSuite($label);
   }
-  
+
   /**
    * @return array of instanciated tests that this GroupTests holds
    */
@@ -19,8 +19,8 @@ class DrupalTestSuite extends TestSuite 
         $this->_test_cases[$i] = &new $class();
       }
     }
-    return $this->_test_cases; 
-  } 
+    return $this->_test_cases;
+  }
 }
 
 class DrupalUnitTests extends DrupalTestSuite {
@@ -32,11 +32,11 @@ class DrupalUnitTests extends DrupalTest
   function DrupalUnitTests($class_list = NULL) {
     static $classes;
     $this->DrupalTestSuite('Drupal Unit Tests');
-    
+
     /* Tricky part to avoid double inclusion */
     if (!$classes) {
       $files = module_invoke_all('simpletest');
-    
+
       $existing_classes = get_declared_classes();
       foreach ($files as $file) {
         include_once($file);
@@ -44,8 +44,8 @@ class DrupalUnitTests extends DrupalTest
       $classes = array_diff(get_declared_classes(), $existing_classes);
     }
     if (!is_null($class_list)) {
-      $classes = $class_list; 
-    }   
+      $classes = $class_list;
+    }
     if (count($classes) == 0) {
       $this->addTestCase(new BadGroupTest($test_file, 'No new test cases'));
       return;
@@ -57,7 +57,7 @@ class DrupalUnitTests extends DrupalTest
     foreach ($groups as $group_name => $group) {
       $group_test = &new DrupalTestSuite($group_name);
       foreach ($group as $key => $v) {
-        $group_test->addTestCase($group[$key]); 
+        $group_test->addTestCase($group[$key]);
       }
       $this->addTestCase($group_test);
     }
@@ -75,14 +75,14 @@ class DrupalUnitTests extends DrupalTest
       $groups[$info['group']][] = $test;
     }
     else {
-      $groups[$class][] = $test; 
+      $groups[$class][] = $test;
     }
   }
-  
+
   /**
    * Invokes run() on all of the held test cases, instantiating
    * them if necessary.
-   * The Druapl version uses paintHeader instead of paintGroupStart
+   * The Drupal version uses paintHeader instead of paintGroupStart
    * to avoid collapsing of the very top level.
    *
    * @param SimpleReporter $reporter    Current test reporter.
@@ -92,12 +92,12 @@ class DrupalUnitTests extends DrupalTest
     cache_clear_all();
     @set_time_limit(0);
     ignore_user_abort(true);
-    
+
     // Disable devel output, check simpletest settings page
     if (!variable_get('simpletest_devel', false)) {
       $GLOBALS['devel_shutdown'] = FALSE;
     }
-        
+
     parent::run($reporter);
 
     // Restores modules
@@ -107,7 +107,7 @@ class DrupalUnitTests extends DrupalTest
     $this->_cleanupModules = array();
 
   }
-  
+
   /**
    * Enables a drupal module
    * @param string $name name of the module
@@ -133,7 +133,7 @@ class DrupalUnitTests extends DrupalTest
       }
     }
     else {
-      die("required module $name could not be enbled, probably file not exists");
+      die("required module $name could not be enabled, probably file not exists");
     }
   }
 
@@ -161,4 +161,3 @@ class DrupalUnitTests extends DrupalTest
     die("incompatible module $name could not be disabled for unknown reason");
   }
 }
-?>
