How to specify a web service URL within a Drupal module's simpletest?
- by Matt V.
I have a Drupal module that talks to a REST API on a separate server for user registration and authentication. The module runs on multiple sites which point to different servers which may run different versions of the REST API.
Ideally, I'd like to be able to run each site against its own end-point, in case changes on the back end break things. Is there a way to dynamically specify a different end-point URL when running a test? Or do I have to edit the .test file for each site?
I'm trying to keep the module's files as generic and flexible as possible. I guess I could have the .test file look for a .inc file that could override the URL, if needed for a particular site. Is there a better way though?