Active
Project:
SimpleTest
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2011 at 13:20 UTC
Updated:
2 Jun 2011 at 13:21 UTC
As evidenced in the settings.php, the $base_url of a site should NOT include trailing slashes. But, in DrupalRemoteTestCase::setUp(), we run $this->remoteUrl = url('', array('absolute' => TRUE)). This will *always* return a URL with a trailing slash (base_path defaults to /, an absolute directory always ends with a slash, etc.). remoteUrl is then used to set the various other base_urls in a Drupal installation. The above code will cause doubleslashes in non-clean URLs: http://example.com/~morbus/qa//?q=user/login.
I've fixed it locally with a simple rtrim:
$this->remoteUrl = rtrim(url('', array('absolute' => TRUE)), '/');