$params = array(
'email' => $this->_email,
'group_id' => 'Wrong Group ID',
- 'contact_id' => '2121',
- 'version' => $this->_apiversion,
- 'time_stamp' => '20111111010101',
+ 'contact_id' => '2121', 'time_stamp' => '20111111010101',
'hash' => 'sasa',
);
$result = $this->callAPIFailure('mailing_event_subscribe', 'create', $params);
'first_name' => 'Test',
'last_name' => 'Test',
'email' => $this->_email,
- 'contact_type' => 'Individual',
- 'version' => $this->_apiversion,
- );
+ 'contact_type' => 'Individual', );
$contactID = $this->individualCreate($params);
$params = array(
'email' => $this->_email,
'group_id' => $this->_groupID,
- 'contact_id' => $contactID,
- 'version' => $this->_apiversion,
- 'hash' => 'b15de8b64e2cec34',
+ 'contact_id' => $contactID, 'hash' => 'b15de8b64e2cec34',
'time_stamp' => '20101212121212',
);
- $result = civicrm_api('mailing_event_subscribe', 'create', $params);
- $this->documentMe($params, $result, __FUNCTION__, __FILE__);
- $this->assertAPISuccess($result, 'in line ' . __LINE__);
+ $result = $this->callAPIAndDocument('mailing_event_subscribe', 'create', $params, __FUNCTION__, __FILE__);
$this->assertEquals($result['values']['contact_id'], $contactID);
$this->contactDelete($contactID);
$params = array(
'job_id' => 'Wrong ID',
'event_queue_id' => 'Wrong ID',
- 'hash' => 'Wrong Hash',
- 'version' => $this->_apiversion,
- 'time_stamp' => '20101212121212',
+ 'hash' => 'Wrong Hash', 'time_stamp' => '20101212121212',
);
$result = $this->callAPIFailure('mailing_event_unsubscribe', 'create', $params);
'job_id' => 'Wrong ID',
'event_queue_id' => 'Wrong ID',
'hash' => 'Wrong Hash',
- 'org_unsubscribe' => 1,
- 'version' => $this->_apiversion,
- 'time_stamp' => '20101212121212',
+ 'org_unsubscribe' => 1, 'time_stamp' => '20101212121212',
);
$result = $this->callAPIFailure('mailing_event_unsubscribe', 'create', $params);
'job_id' => 'Wrong ID',
'event_queue_id' => 'Wrong ID',
'hash' => 'Wrong Hash',
- 'org_unsubscribe' => 'test',
- 'version' => $this->_apiversion,
- 'time_stamp' => '20101212121212',
+ 'org_unsubscribe' => 'test', 'time_stamp' => '20101212121212',
);
$result = $this->callAPIFailure('mailing_event_resubscribe', 'create', $params);
$this->assertEquals($result['error_message'], 'Queue event could not be found', 'In line ' . __LINE__);
'first_name' => 'Test',
'last_name' => 'Test',
'email' => $this->_email,
- 'contact_type' => 'Individual',
- 'version' => $this->_apiversion,
- );
+ 'contact_type' => 'Individual', );
$contactID = $this->individualCreate($params);
$params = array(
'email' => $this->_email,
'group_id' => $this->_groupID,
- 'contact_id' => $contactID,
- 'version' => $this->_apiversion,
- 'hash' => 'b15de8b64e2cec34',
+ 'contact_id' => $contactID, 'hash' => 'b15de8b64e2cec34',
'time_stamp' => '20101212121212',
);
- $result = civicrm_api('mailing_event_subscribe', 'create', $params);
+ $result = $this->callAPISuccess('mailing_event_subscribe', 'create', $params);
$this->assertAPISuccess($result, 'in line ' . __LINE__);
$this->assertEquals($result['values']['contact_id'], $contactID);
$params = array(
'contact_id' => $result['values']['contact_id'],
'subscribe_id' => $result['values']['subscribe_id'],
- 'hash' => $result['values']['hash'],
- 'version' => $this->_apiversion,
- 'time_stamp' => '20101212121212',
+ 'hash' => $result['values']['hash'], 'time_stamp' => '20101212121212',
'event_subscribe_id' => $result['values']['subscribe_id'],
);
- $result = civicrm_api('mailing_event_confirm', 'create', $params);
+ $result = $this->callAPISuccess('mailing_event_confirm', 'create', $params);
$this->assertAPISuccess($result, 'in line ' . __LINE__);
$this->contactDelete($contactID);