Skip to content

Commit

Permalink
CRM-21182 - Add test for fetching case fields in activity.get
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Sep 14, 2017
1 parent 2c9e444 commit 5394ee6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/phpunit/api/v3/ActivityCaseTest.php
Expand Up @@ -77,4 +77,15 @@ public function testGet() {
$this->assertEquals(array(), array_intersect($getByCaseId_ids, $getByCaseNull_ids));
}

public function testActivityGetWithCaseInfo() {
$activities = $this->callAPISuccess('Activity', 'get', array(
'sequential' => 1,
'case_id' => $this->_case['id'],
'return' => array('case_id', 'case_id.subject'),
));
$this->assertEquals(__CLASS__, $activities['values'][0]['case_id.subject']);
// Note - case_id is always an array
$this->assertEquals($this->_case['id'], $activities['values'][0]['case_id'][0]);
}

}

0 comments on commit 5394ee6

Please sign in to comment.