From 0090e3d21f477d3b4ce5c90b5b6bd2cd0d2bca79 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 1 May 2014 16:08:15 -0700 Subject: [PATCH] CRM-14319 test set up tweaks --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 3 ++- tests/phpunit/api/v3/JobTest.php | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index f6f06ef67e..f48d4c401b 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -964,12 +964,13 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { function membershipTypeCreate($params = array()) { CRM_Member_PseudoConstant::flush('membershipType'); CRM_Core_Config::clearDBCache(); + $memberOfOrganization = $this->organizationCreate(); $params = array_merge(array( 'name' => 'General', 'duration_unit' => 'year', 'duration_interval' => 1, 'period_type' => 'rolling', - 'member_of_contact_id' => 1, + 'member_of_contact_id' => $memberOfOrganization, 'domain_id' => 1, 'financial_type_id' => 1, 'is_active' => 1, diff --git a/tests/phpunit/api/v3/JobTest.php b/tests/phpunit/api/v3/JobTest.php index 480a0d6c31..efc7c14b1c 100644 --- a/tests/phpunit/api/v3/JobTest.php +++ b/tests/phpunit/api/v3/JobTest.php @@ -59,6 +59,7 @@ class api_v3_JobTest extends CiviUnitTestCase { function tearDown() { $this->quickCleanup(array('civicrm_job')); + $this->quickCleanUpFinancialEntities(); CRM_Utils_Hook::singleton()->reset(); parent::tearDown(); } @@ -187,6 +188,7 @@ class api_v3_JobTest extends CiviUnitTestCase { */ public function testCallSendReminderSuccessMoreThanDefaultLimit() { $membershipTypeID = $this->membershipTypeCreate(); + $this->membershipStatusCreate(); $createTotal = 30; for($i = 1; $i <= $createTotal; $i++) { $contactID = $this->individualCreate(); -- 2.25.1