Removes dependency on silverstripe environment for unit tests.