Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.4.1
-
Fix Version/s: 4.1.0
-
Component/s: CiviCRM API
-
Labels:None
Description
api_v3_ActivityTest::testActivityCreateWithMissingContactId fails due to there not being a userID in the session
if ( !CRM_Utils_Array::value('source_contact_id',$params ))
{ $session = CRM_Core_Session::singleton( ); $params['source_contact_id'] = $session->get( 'userID' ); }We need a way to force session to hold specific variables (contact_id in this case & presumably uf_id) for testing purposes.
Note that I also want to call this from my drupal tests - I am using simpletest to test custom code as that allows me to test with the combination of modules on my site (rules etc). I doubt this has any bearing on the fix though.