Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make clearMessages() clear all (not just one) message per default. #9504

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/phpunit/CRM/Core/Payment/AuthorizeNetIPNTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function testIPNPaymentMembershipRecurSuccessNoLeakageOnlineThenOffline()
$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();

Expand Down
5 changes: 3 additions & 2 deletions tests/phpunit/CiviTest/CiviMailUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,13 @@ public function assertSubjects($expectedSubjects) {
* 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 implementated: clearMessages for 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);
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/api/v3/ContributionPageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public function testSubmitMembershipBlockNotSeparatePaymentZeroDollarsWithEmail(
)
);
$mut->stop();
$mut->clearMessages(999);
$mut->clearMessages();
}

/**
Expand Down Expand Up @@ -453,7 +453,7 @@ public function testSubmitMembershipBlockIsSeparatePaymentWithEmail() {
)
);
$mut->stop();
$mut->clearMessages(999);
$mut->clearMessages();
}

/**
Expand Down