Checking if module has the right output on multilingual pages with simpletest_clone I'm trying with simpletest_clone to check if my modules have the right output depending on the language.

Now my problem is, that when I do the following Code:

$this-&gt;drupalGet('de');
// check the output

$this-&gt;drupalGet('fr');
// check the output again for the french version


Drupal then checks for localhost/de/de and localhost/de/fr (de is the default language) instead of localhost/de and localhost/fr

How can I change that behaviour?
I would set the default langauge in code first instead.

// Get the list of languages
$languages = language_list();

// Set up the new language code
$new_lang_code = 'fr';

// Make sure the required language object is actually set
if (isset($languages[$new_lang_code])) {
  // Overwrite the global language object
  global $language;
  $language = $languages[$new_lang_code];
}


and then you just need to get the front page (and Drupal should add the prefix).

$this-&gt;drupalGet('&lt;front&gt;');


If front doesn't work you might need

$front_url = variable_get('site_frontpage', 'node');
$this-&gt;drupalGet($front_url);