api test fix for testCreateWithRelationship() MembershipTest
authorJitendra Purohit <jitendra.purohit@webaccessglobal.com>
Tue, 12 Aug 2014 10:45:02 +0000 (16:15 +0530)
committerJitendra Purohit <jitendra.purohit@webaccessglobal.com>
Tue, 12 Aug 2014 10:45:02 +0000 (16:15 +0530)
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/api/v3/MembershipTest.php

index 121b89cdb65b553611aad41cc8f5608bb641b095..b6d5a62298cea411e39d254154117dcb3f0d0bb6 100644 (file)
@@ -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'
         );
index 70f6346668e41507a2eb542f52da44d9a31aa4a3..b8611d21aa76fc9557ce95a0ed9f2cfc77178627 100644 (file)
@@ -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(