From f826e3eb524a706fa9b8438ac4ace73b3c245dd1 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 14 Oct 2016 23:06:22 -0400 Subject: [PATCH] CRM-19506 - Add caseContact test --- tests/phpunit/api/v3/CaseContactTest.php | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/phpunit/api/v3/CaseContactTest.php diff --git a/tests/phpunit/api/v3/CaseContactTest.php b/tests/phpunit/api/v3/CaseContactTest.php new file mode 100644 index 0000000000..6e8782699e --- /dev/null +++ b/tests/phpunit/api/v3/CaseContactTest.php @@ -0,0 +1,46 @@ +_entity = 'case'; + + parent::setUp(); + + $this->_cid = $this->individualCreate(); + + $this->_case = $this->callAPISuccess('case', 'create', array( + 'case_type_id' => $this->caseTypeId, + 'subject' => __CLASS__, + 'contact_id' => $this->_cid, + )); + } + + public function testCaseContactGet() { + $result = $this->callAPIAndDocument('CaseContact', 'get', array( + 'contact_id' => $this->_cid, + ), __FUNCTION__, __FILE__); + $this->assertEquals($this->_case['id'], $result['id']); + } + +} -- 2.25.1