Skip to content

Commit

Permalink
[nfc] Minor test tidy ups
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Mar 22, 2018
1 parent bb7aacf commit 5cd3eae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/phpunit/CRM/Contribute/BAO/ContributionRecurTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function testCancelRecur() {
*/
public function testSupportFinancialTypeChange() {
$contributionRecur = $this->callAPISuccess('contribution_recur', 'create', $this->_params);
$this->callAPISuccess('contribution', 'create', array(
$this->callAPISuccess('Contribution', 'create', array(
'contribution_recur_id' => $contributionRecur['id'],
'total_amount' => '3.00',
'financial_type_id' => 1,
Expand Down
10 changes: 5 additions & 5 deletions tests/phpunit/CRM/Contribute/Form/SearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function testBatchFilter() {
$batchTitle = CRM_Batch_BAO_Batch::generateBatchName();

// create batch
$batch = civicrm_api3('Batch', 'create', array(
$batch = $this->callAPISuccess('Batch', 'create', array(
'created_id' => $this->_individual,
'created_date' => CRM_Utils_Date::processDate(date("Y-m-d"), date("H:i:s")),
'status_id' => CRM_Core_Pseudoconstant::getKey('CRM_Batch_BAO_Batch', 'status_id', 'Data Entry'),
Expand Down Expand Up @@ -98,7 +98,7 @@ public function testBatchFilter() {
);

// create random contribution to check IS NULL filter more precisely
$nonBatchContri = civicrm_api3('Contribution', 'create', array(
$nonBatchContri = $this->callAPISuccess('Contribution', 'create', array(
'financial_type_id' => 1,
'total_amount' => 123,
'receive_date' => '2014-07-24',
Expand All @@ -116,7 +116,7 @@ public function testBatchFilter() {
$form->testProcessContribution($batchEntry);

// fetch created contributions
$entities = civicrm_api3('EntityBatch', 'get', array('batch_id' => $batchID));
$entities = $this->callAPISuccess('EntityBatch', 'get', array('batch_id' => $batchID));
$ids = array();
foreach ($entities['values'] as $value) {
$ids[] = $value['entity_id'];
Expand Down Expand Up @@ -201,7 +201,7 @@ public function testCardTypeFilter() {
'contribution_status_id' => 1,
'contact_id' => $contactID1,
));
$Contribution3 = civicrm_api3('Contribution', 'create', array(
$Contribution3 = $this->callAPISuccess('Contribution', 'create', array(
'financial_type_id' => 1,
'total_amount' => 200,
'receive_date' => date('Ymd'),
Expand Down Expand Up @@ -307,7 +307,7 @@ public function testCardNumberFilter() {
'contribution_status_id' => 1,
'contact_id' => $contactID1,
));
$Contribution3 = civicrm_api3('Contribution', 'create', array(
$Contribution3 = $this->callAPISuccess('Contribution', 'create', array(
'financial_type_id' => 1,
'total_amount' => 200,
'receive_date' => date('Ymd'),
Expand Down

0 comments on commit 5cd3eae

Please sign in to comment.