? patch
Index: drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/Attic/drupal_web_test_case.php,v
retrieving revision 1.2.2.3.2.47
diff -u -p -r1.2.2.3.2.47 drupal_web_test_case.php
--- drupal_web_test_case.php	27 Jan 2010 01:55:29 -0000	1.2.2.3.2.47
+++ drupal_web_test_case.php	10 Nov 2010 00:32:15 -0000
@@ -1882,6 +1882,14 @@ class DrupalWebTestCase extends DrupalTe
       if (substr($path, 0, $n) == $base_path) {
         $path = substr($path, $n);
       }
+      // This workarround avoids the language code from appearing twice in the url.
+      // Otherwise this->drupalLogin might lead to /en/en/user for example.
+      if (module_exists('locale')) {
+        global $language;
+      	if(substr($path, 0 , 3) == $language->language . "/") {
+      		$path = substr($path, 3);
+      	}
+      }
       if (isset($parts['query'])) {
         $options['query'] = $parts['query'];
       }
