+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
*/
-require_once 'CiviTest/CiviUnitTestCase.php';
-
/**
* Test APIv3 ability to join across multiple entities
*
* @package CiviCRM_APIv3
+ * @group headless
*/
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']);
}
}