Since Simpletests now run as clean multi-site installations in /sites/simpletest/ it became impossible to override anything in settings.php
, be it PHP configuration via ini_set()
, Drupal configuration via $config
or various low level things via settings
or any other variable you can set in settings.php
. These test specific overrides need to go into a file called sites/default/settings.testing.php
. This file will be copied and included by the settings.php for each test. As said above, anything that can go into settings.php
can go into this file. There is one additional feature: the $test_class
variable contains the fully qualified classname of the test being ran.
Example:
If you want to run tests behind a reverse proxy, usually $base_url
needs to be set. So your sites/default/settings.testing.php
would look like:
$base_url = "http://example.com";