Commit b13d4a61 authored by Seamus Lee's avatar Seamus Lee
Browse files

Clear all Messages when running clearMessages by default

parent 8e998f78
......@@ -192,7 +192,7 @@ class CRM_Core_Payment_AuthorizeNetIPNTest extends CiviUnitTestCase {
$this->_contributionPageID = NULL;
$this->setupMembershipRecurringPaymentProcessorTransaction(array('is_email_receipt' => TRUE));
$mut->clearMessages(99999);
$mut->clearMessages();
$IPN = new CRM_Core_Payment_AuthorizeNetIPN($this->getRecurTransaction(array('x_trans_id' => 'hers')));
$IPN->main();
......
......@@ -331,15 +331,20 @@ class CiviMailUtils extends PHPUnit_Framework_TestCase {
* Remove any sent messages from the log.
*
* @param int $limit
* How many recent messages to remove, defaults to 0 (all).
*
* @throws \Exception
*/
public function clearMessages($limit = 1) {
public function clearMessages($limit = 0) {
if ($this->_webtest) {
throw new Exception("Not implemented: clearMessages for WebTest");
}
else {
CRM_Core_DAO::executeQuery('DELETE FROM civicrm_mailing_spool ORDER BY id DESC LIMIT ' . $limit);
$sql = 'DELETE FROM civicrm_mailing_spool ORDER BY id DESC';
if ($limit) {
$sql .= ' LIMIT ' . $limit;
}
CRM_Core_DAO::executeQuery($sql);
}
}
......
......@@ -431,7 +431,7 @@ class api_v3_ContributionPageTest extends CiviUnitTestCase {
)
);
$mut->stop();
$mut->clearMessages(999);
$mut->clearMessages();
}
/**
......@@ -505,7 +505,7 @@ class api_v3_ContributionPageTest extends CiviUnitTestCase {
)
);
$mut->stop();
$mut->clearMessages(999);
$mut->clearMessages();
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment