-
-
Notifications
You must be signed in to change notification settings - Fork 826
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CRM-17647 fix for submitting payment with thousand separator
- Loading branch information
1 parent
b2c29c4
commit e91e148
Showing
4 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,9 +119,14 @@ public function testSubmitUpaidPriceChangeWhileStillPending() { | |
/** | ||
* Initial test of submit function. | ||
* | ||
* @param string $thousandSeparator | ||
* | ||
* @dataProvider getThousandSeparators | ||
* | ||
* @throws \Exception | ||
*/ | ||
public function testSubmitWithPayment() { | ||
public function testSubmitWithPayment($thousandSeparator) { | ||
$this->setCurrencySeparators($thousandSeparator); | ||
$form = $this->getForm(array('is_monetary' => 1, 'financial_type_id' => 1)); | ||
$form->_mode = 'Live'; | ||
$form->_quickConfig = TRUE; | ||
|
@@ -156,16 +161,16 @@ public function testSubmitWithPayment() { | |
13 => 1, | ||
), | ||
'amount_level' => 'Too much', | ||
'fee_amount' => 55, | ||
'total_amount' => 55, | ||
'fee_amount' => $this->formatMoneyInput(1550.55), | ||
'total_amount' => $this->formatMoneyInput(1550.55), | ||
'from_email_address' => '[email protected]', | ||
'send_receipt' => 1, | ||
'receipt_text' => '', | ||
)); | ||
$participants = $this->callAPISuccess('Participant', 'get', array()); | ||
$this->assertEquals(1, $participants['count']); | ||
$contribution = $this->callAPISuccessGetSingle('Contribution', array()); | ||
$this->assertEquals(55, $contribution['total_amount']); | ||
$this->assertEquals(1550.55, $contribution['total_amount']); | ||
$this->assertEquals('Debit Card', $contribution['payment_instrument']); | ||
} | ||
|
||
|