Active
Project:
Mockable: Mock objects for Drupal
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Sep 2013 at 11:40 UTC
Updated:
29 Sep 2013 at 11:45 UTC
For now modules must change:
- REQUEST_TIME for mockable_time() (perhaps mockable_time() can still be used as the time elapsed since the request, see #2100517: Review how REQUEST_TIME and time() are mocked)
- $_SERVER['HTTP_USER_AGENT'] for mockable_browser()
Perhaps it might be better, if possible, to override REQUEST_TIME and $_SERVER['HTTP_USER_AGENT'], in our module so that other modules need not modify their code at all (as is the case currently for their Javascript).
If so, should the real data (time, and user agent) be available somehow? Perhaps not.
Comments
Comment #1
alberto56 commentedSee also #2100523: Create mockable_http_request module for mocking http requests.