Commit 862f66aa authored by eileen's avatar eileen 🎱 Committed by GitHub

Merge pull request #10525 from seamuslee001/contribution_test_rigger_fix

(NFC) Fix clearing messages to ensure test accuracy
parents 8b1e918c 247ce80d
...@@ -186,7 +186,7 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase { ...@@ -186,7 +186,7 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase {
*/ */
public function testSubmitCreditCardPayPal() { public function testSubmitCreditCardPayPal() {
$mut = new CiviMailUtils($this, TRUE); $mut = new CiviMailUtils($this, TRUE);
$mut->clearMessages(0); $mut->clearMessages();
$form = new CRM_Contribute_Form_Contribution(); $form = new CRM_Contribute_Form_Contribution();
$paymentProcessorID = $this->paymentProcessorCreate(array('is_test' => 0)); $paymentProcessorID = $this->paymentProcessorCreate(array('is_test' => 0));
$form->_mode = 'Live'; $form->_mode = 'Live';
...@@ -246,6 +246,7 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase { ...@@ -246,6 +246,7 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase {
$msgs = $mut->getAllMessages(); $msgs = $mut->getAllMessages();
$this->assertEquals(1, count($msgs)); $this->assertEquals(1, count($msgs));
} }
$mut->clearMessages();
$mut->stop(); $mut->stop();
} }
...@@ -254,7 +255,7 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase { ...@@ -254,7 +255,7 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase {
*/ */
public function testSubmitCreditCardWithEmailReceipt() { public function testSubmitCreditCardWithEmailReceipt() {
$mut = new CiviMailUtils($this, TRUE); $mut = new CiviMailUtils($this, TRUE);
$mut->clearMessages(0); $mut->clearMessages();
$form = new CRM_Contribute_Form_Contribution(); $form = new CRM_Contribute_Form_Contribution();
$form->_mode = 'Live'; $form->_mode = 'Live';
$error = FALSE; $error = FALSE;
......
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