protected $_groupID;
protected $_email;
protected $_apiversion;
- public $_eNoticeCompliant = FALSE;
+ public $_eNoticeCompliant = TRUE;
+
function get_info() {
return array(
'name' => 'Mailer Group',
function setUp() {
parent::setUp();
$this->_apiversion = 3;
- $this->_groupID = $this->groupCreate(NULL);
- $this->_email = 'test@test.test';
+ $this->_groupID = $this->groupCreate(NULL);
+ $this->_email = 'test@test.test';
}
function tearDown() {
$params = array(
'email' => $this->_email,
'group_id' => 'Wrong Group ID',
- 'contact_id' => '2121', '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', );
+ 'contact_type' => 'Individual',
+ );
$contactID = $this->individualCreate($params);
$params = array(
$params = array(
'job_id' => 'Wrong ID',
'event_queue_id' => 'Wrong ID',
- 'hash' => 'Wrong Hash', '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, 'time_stamp' => '20101212121212',
+ 'org_unsubscribe' => 1,
+ 'time_stamp' => '20101212121212',
);
$result = $this->callAPIFailure('mailing_event_unsubscribe', 'create', $params);
$this->assertEquals($result['error_message'], 'Domain Queue event could not be found', 'In line ' . __LINE__);
}
-
//----------- civicrm_mailing_group_event_resubscribe methods--------
/**
'job_id' => 'Wrong ID',
'event_queue_id' => 'Wrong ID',
'hash' => 'Wrong Hash',
- 'org_unsubscribe' => 'test', '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', );
+ 'contact_type' => 'Individual',
+ );
$contactID = $this->individualCreate($params);
$params = array(
'email' => $this->_email,
'group_id' => $this->_groupID,
- 'contact_id' => $contactID, 'hash' => 'b15de8b64e2cec34',
+ 'contact_id' => $contactID,
+ 'hash' => 'b15de8b64e2cec34',
'time_stamp' => '20101212121212',
);
$result = $this->callAPISuccess('mailing_event_subscribe', 'create', $params);
$params = array(
'contact_id' => $result['values'][$result['id']]['contact_id'],
'subscribe_id' => $result['values'][$result['id']]['subscribe_id'],
- 'hash' => $result['values'][$result['id']]['hash'], 'time_stamp' => '20101212121212',
+ 'hash' => $result['values'][$result['id']]['hash'],
+ 'time_stamp' => '20101212121212',
'event_subscribe_id' => $result['values'][$result['id']]['subscribe_id'],
);
function setUp() {
parent::setUp();
- $this->_groupID = $this->groupCreate(NULL);
- $this->_email = 'test@test.test';
+ $this->_groupID = $this->groupCreate(NULL);
+ $this->_email = 'test@test.test';
$this->_params = array(
'subject' => 'maild',
'body_text' => 'bdkfhdskfhduew',
$result = $this->callAPIAndDocument('mailing', 'create', $this->_params, __FUNCTION__, __FILE__);
$jobs = $this->callAPISuccess('mailing_job', 'get', array('mailing_id' => $result['id']));
$this->assertEquals(1, $jobs['count']);
- unset($this->_params['created_id']);// return isn't working on this in getAndCheck so lets not check it for now
+ unset($this->_params['created_id']); // return isn't working on this in getAndCheck so lets not check it for now
$this->getAndCheck($this->_params, $result['id'], 'mailing');
}
'hash' => 'Wrong Hash',
'event_subscribe_id' => '123',
'time_stamp' => '20111111010101',
- );
+ );
$result = $this->callAPIFailure('mailing_event', 'confirm', $params,
'Confirmation failed'
);
'bodyTxt' => 'Body...',
'replyTo' => $this->_email,
'time_stamp' => '20111111010101',
- );
+ );
$result = $this->callAPIFailure('mailing_event', 'reply', $params,
'Queue event could not be found'
);
'hash' => 'Wrong Hash',
'email' => $this->_email,
'time_stamp' => '20111111010101',
- );
+ );
$result = $this->callAPIFailure('mailing_event', 'forward', $params,
'Queue event could not be found'
);
}
-
//----------- civicrm_mailing_create ----------
}