Case test fixes
authorColeman Watts <coleman@civicrm.org>
Thu, 7 Jan 2016 19:24:04 +0000 (14:24 -0500)
committerColeman Watts <coleman@civicrm.org>
Sat, 9 Jan 2016 01:51:02 +0000 (20:51 -0500)
tests/phpunit/api/v3/CaseTest.php

index d4112f19eafee7b973a9f01c7196bc3c63a4e745..42c82fcc98e98dd59d45297afc4d34f164c47efb 100644 (file)
@@ -128,11 +128,11 @@ class api_v3_CaseTest extends CiviCaseTestCase {
 
     // Update Case.
     $params = array('id' => $id);
-    $params['subject'] = $case['subject'] = $case['case_subject'] = 'Something Else';
+    $params['subject'] = $case['subject'] = 'Something Else';
     $this->callAPISuccess('case', 'create', $params);
 
     // Verify that updated case is exactly equal to the original with new subject.
-    $result = $this->callAPISuccess('case', 'getsingle', array('case_id' => $id));
+    $result = $this->callAPISuccessGetSingle('Case', array('case_id' => $id));
     $this->assertAPIArrayComparison($result, $case);
   }
 
@@ -190,7 +190,7 @@ class api_v3_CaseTest extends CiviCaseTestCase {
     $id = $result['id'];
 
     // Store result for later
-    $case = $this->callAPISuccess('case', 'getsingle', array('id' => $id, 'return' => array('activities', 'contacts')));
+    $case = $this->callAPISuccessGetSingle('case', array('id' => $id, 'return' => array('activities', 'contacts')));
 
     // Fetch case based on client contact id
     $result = $this->callAPISuccess('case', 'get', array(
@@ -209,7 +209,7 @@ class api_v3_CaseTest extends CiviCaseTestCase {
     $id = $result['id'];
 
     // Store result for later
-    $case = $this->callAPISuccess('case', 'getsingle', array('id' => $id, 'return' => 'subject'));
+    $case = $this->callAPISuccessGetSingle('Case', array('id' => $id, 'return' => 'subject'));
 
     // Fetch case based on client contact id
     $result = $this->callAPISuccess('case', 'get', array(
@@ -241,7 +241,7 @@ class api_v3_CaseTest extends CiviCaseTestCase {
     $id = $result['id'];
 
     // Store result for later
-    $case = $this->callAPISuccess('case', 'getsingle', array('id' => $id, 'return' => 'contact_id'));
+    $case = $this->callAPISuccessGetSingle('Case', array('id' => $id, 'return' => 'contact_id'));
 
     $result = $this->callAPISuccess('case', 'get', array('limit' => 0, 'return' => array('contact_id')));
     $this->assertAPIArrayComparison($result['values'][$id], $case);