From 932a690449cd8a934e6f56acbb54000917837c7e Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Tue, 12 Aug 2014 16:15:02 +0530 Subject: [PATCH] api test fix for testCreateWithRelationship() MembershipTest --- tests/phpunit/CiviTest/CiviUnitTestCase.php | 1 - tests/phpunit/api/v3/MembershipTest.php | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviUnitTestCase.php b/tests/phpunit/CiviTest/CiviUnitTestCase.php index 121b89cdb6..b6d5a62298 100644 --- a/tests/phpunit/CiviTest/CiviUnitTestCase.php +++ b/tests/phpunit/CiviTest/CiviUnitTestCase.php @@ -1051,7 +1051,6 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase { $params[$key] = $values[$seq % sizeof($values)]; } if ($contact_type == 'Individual' ) { - $employer = $this->sampleContact('Organization', $seq); $params['email'] = strtolower( $params['first_name'] . '_' . $params['last_name'] . '@civicrm.org' ); diff --git a/tests/phpunit/api/v3/MembershipTest.php b/tests/phpunit/api/v3/MembershipTest.php index 70f6346668..b8611d21aa 100644 --- a/tests/phpunit/api/v3/MembershipTest.php +++ b/tests/phpunit/api/v3/MembershipTest.php @@ -506,14 +506,13 @@ class api_v3_MembershipTest extends CiviUnitTestCase { 'membership_type_id' => $membershipTypeId, ); $result = $this->callAPISuccess('membership', 'get', $params); - //exit; // If it fails here CRM-14758 is not fixed $this->assertEquals(1, $result['count']); $result = $result['values'][$result['id']]; $this->assertEquals($OrganizationMembershipID, $result['owner_membership_id']); // Create third employee - $memberContactId[2] = $this->individualCreate(array('current_employer' => $employerId[0]), 2); + $memberContactId[2] = $this->individualCreate(array('employer_id' => $employerId[0]), 2); // Check that employee does NOT inherit the membership (max_related = 2) $params = array( -- 2.25.1