* @subpackage API_Job
*
* @copyright CiviCRM LLC (c) 2004-2017
- * @version $Id: Job.php 30879 2010-11-22 15:45:55Z shot $
- *
*/
/**
public function setUp() {
$this->useTransaction();
parent::setUp();
- CRM_Mailing_BAO_MailingJob::$mailsProcessed = 0; // DGW
+ CRM_Mailing_BAO_MailingJob::$mailsProcessed = 0;
$this->_groupID = $this->groupCreate();
$this->createContactsInGroup(2, $this->_groupID);
'open_tracking' => 1,
// Note: open_tracking does nothing with text, but we'll just verify that it does nothing
));
- foreach ($allMessages as $k => $message) {
+ foreach ($allMessages as $message) {
/** @var ezcMail $message */
/** @var ezcMailText $textPart */
'open_tracking' => 1,
'url_tracking' => 0,
));
- foreach ($allMessages as $k => $message) {
+ foreach ($allMessages as $message) {
/** @var ezcMail $message */
/** @var ezcMailText $htmlPart */
/** @var ezcMailText $textPart */
'open_tracking' => 1,
'url_tracking' => 1,
));
- foreach ($allMessages as $k => $message) {
+ foreach ($allMessages as $message) {
/** @var ezcMail $message */
/** @var ezcMailText $htmlPart */
/** @var ezcMailText $textPart */
}
}
+ /**
+ * Each case comes in four parts:
+ * 1. Mailing HTML (body_html)
+ * 2. Regex to run against final HTML
+ * 3. Regex to run against final text
+ * 4. Additional mailing options
+ *
+ * @return array
+ */
public function urlTrackingExamples() {
$cases = array();
- // Each case comes in four parts:
- // 1. Mailing HTML (body_html)
- // 2. Regex to run against final HTML
- // 3. Regex to run against final text
- // 4. Additional mailing options
-
// Tracking disabled
-
$cases[] = array(
'<p><a href="http://example.net/">Foo</a></p>',
';<p><a href="http://example\.net/">Foo</a></p>;',
);
// Tracking enabled
-
$cases[] = array(
'<p><a href="http://example.net/">Foo</a></p>',
';<p><a href=[\'"].*extern/url\.php\?u=\d+.*[\'"]>Foo</a></p>;',
'subject' => 'Example Subject',
'body_html' => $inputHtml,
));
- foreach ($allMessages as $k => $message) {
+ foreach ($allMessages as $message) {
/** @var ezcMail $message */
/** @var ezcMailText $htmlPart */
/** @var ezcMailText $textPart */
$this->_email = 'test@test.test';
}
- //---------- civicrm_mailing_event_subscribe methods ---------
-
/**
* Test civicrm_mailing_group_event_subscribe with wrong params.
*/
$this->contactDelete($contactID);
}
- //-------- civicrm_mailing_group_event_unsubscribe methods-----------
-
/**
* Test civicrm_mailing_group_event_unsubscribe with wrong params.
*/
$this->callAPIFailure('mailing_event_unsubscribe', 'create', $params);
}
- //--------- civicrm_mailing_group_event_domain_unsubscribe methods -------
-
/**
* Test civicrm_mailing_group_event_domain_unsubscribe with wrong params.
*/
$this->callAPIFailure('mailing_event_unsubscribe', 'create', $params);
}
- //----------- civicrm_mailing_group_event_resubscribe methods--------
-
/**
* Test civicrm_mailing_group_event_resubscribe with wrong params type.
*/
$this->callAPIFailure('mailing_event_resubscribe', 'create', $params);
}
- //------------------------ success case ---------------------
-
/**
* Test civicrm_mailing_group_event_subscribe and civicrm_mailing_event_confirm functions - success expected.
*/
'event_subscribe_id' => $result['values'][$result['id']]['subscribe_id'],
);
- $result = $this->callAPISuccess('mailing_event_confirm', 'create', $params);
+ $this->callAPISuccess('mailing_event_confirm', 'create', $params);
$this->contactDelete($contactID);
}