From c3a3074fd6c012f52f9fbbfeeac8a34c40b152d8 Mon Sep 17 00:00:00 2001 From: eileenmcnaughton Date: Mon, 13 Jul 2015 05:49:03 +0000 Subject: [PATCH] test fix, remove old param & fix comments --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 8 ++------ tests/phpunit/api/v3/ContributionSoftTest.php | 2 +- tests/phpunit/api/v3/PledgePaymentTest.php | 2 +- tests/phpunit/api/v3/TaxContributionPageTest.php | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index ed6ef2548f..a803e0212d 100755 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -1636,23 +1636,19 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { /** * Create contribution. * - * @param int|array $params - * Array of parameters or Contact_id (legacy) . + * @param array $params + * Array of parameters. * @param int $cTypeID * Id of financial type. * @param int $invoiceID * @param int $trxnID * @param int $paymentInstrumentID - * @param bool $isFee * * @return int * id of created contribution */ public function contributionCreate($params, $cTypeID = 1, $invoiceID = 67890, $trxnID = 12345, $paymentInstrumentID = 1) { - if (!is_array($params)) { - $params = array('contact_id' => $params); - } $params = array_merge(array( 'domain_id' => 1, diff --git a/tests/phpunit/api/v3/ContributionSoftTest.php b/tests/phpunit/api/v3/ContributionSoftTest.php index 3b5809a23b..fe374aafbd 100644 --- a/tests/phpunit/api/v3/ContributionSoftTest.php +++ b/tests/phpunit/api/v3/ContributionSoftTest.php @@ -56,7 +56,7 @@ class api_v3_ContributionSoftTest extends CiviUnitTestCase { $this->_individualId = $this->individualCreate(); $this->_softIndividual1Id = $this->individualCreate(); $this->_softIndividual2Id = $this->individualCreate(); - $this->_contributionId = $this->contributionCreate($this->_individualId); + $this->_contributionId = $this->contributionCreate(array('contact_id' => $this->_individualId)); $paymentProcessor = $this->processorCreate(); $this->_params = array( diff --git a/tests/phpunit/api/v3/PledgePaymentTest.php b/tests/phpunit/api/v3/PledgePaymentTest.php index 53210584f3..2b23ac8351 100644 --- a/tests/phpunit/api/v3/PledgePaymentTest.php +++ b/tests/phpunit/api/v3/PledgePaymentTest.php @@ -49,7 +49,7 @@ class api_v3_PledgePaymentTest extends CiviUnitTestCase { parent::setUp(); $this->_individualId = $this->individualCreate(); $this->_pledgeID = $this->pledgeCreate($this->_individualId); - $this->_contributionID = $this->contributionCreate($this->_individualId); + $this->_contributionID = $this->contributionCreate(array('contact_id' => $this->_individualId)); } public function tearDown() { diff --git a/tests/phpunit/api/v3/TaxContributionPageTest.php b/tests/phpunit/api/v3/TaxContributionPageTest.php index 077c713c78..01c8333209 100644 --- a/tests/phpunit/api/v3/TaxContributionPageTest.php +++ b/tests/phpunit/api/v3/TaxContributionPageTest.php @@ -523,7 +523,7 @@ class api_v3_TaxContributionPageTest extends CiviUnitTestCase { * */ public function testDeleteContribution() { - $contributionID = $this->contributionCreate($this->_individualId, $this->financialtypeID, 'dfsdf', 12389); + $contributionID = $this->contributionCreate(array('contact_id' => $this->_individualId), $this->financialtypeID, 'dfsdf', 12389); $params = array( 'id' => $contributionID, ); -- 2.25.1