Merge pull request #10030 from eileenmcnaughton/test
[civicrm-core.git] / tests / phpunit / api / v3 / EntityJoinTest.php
index 30713a962d29b961d581157a807a8fc3a153b562..9933a9ba8da362fad797dfc28406371b2b19f903 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016                                |
+ | Copyright CiviCRM LLC (c) 2004-2017                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -42,14 +42,15 @@ class api_v3_EntityJoinTest extends CiviUnitTestCase {
     $first = 'firstthisisatest';
     $last = 'lastthisisatest';
     $org = $this->organizationCreate(array('organization_name' => 'Employer of one'));
-    $person1 = $this->individualCreate(array('employer_id' => $org, 'first_name' => $first, 'last_name' => $last));
+    $person1 = $this->individualCreate(array('employer_id' => $org, 'first_name' => $first, 'last_name' => $last, 'gender_id' => 1));
     $person2 = $this->individualCreate(array(), 1);
     $result = $this->callAPISuccessGetSingle('Email', array(
-      'return' => 'contact_id.employer_id.display_name',
+      'return' => 'contact_id.employer_id.display_name,contact_id.gender_id.label',
       'contact_id.last_name' => $last,
       'contact_id.first_name' => $first,
     ));
     $this->assertEquals('Employer of one', $result['contact_id.employer_id.display_name']);
+    $this->assertEquals('Female', $result['contact_id.gender_id.label']);
   }
 
 }