SyntaxConformanceAllEntitiesTest - Re-enable testSimple_get() and fix failure for...
authorTim Otten <totten@civicrm.org>
Tue, 26 Mar 2013 01:10:58 +0000 (21:10 -0400)
committerTim Otten <totten@civicrm.org>
Tue, 26 Mar 2013 01:10:58 +0000 (21:10 -0400)
api/v3/Case.php
tests/phpunit/api/v3/SyntaxConformanceAllEntitiesTest.php

index 7e465b482d9da9900501232b96fcb314fb325d5a..5f6d4d0debb768c71a35bbdb3224f128fdfe8f92 100644 (file)
@@ -187,6 +187,10 @@ function _civicrm_api3_case_delete_spec(&$params) {
  * @todo Erik Hommel 16 dec 2010 check if all DB fields are returned
  */
 function civicrm_api3_case_get($params) {
+  civicrm_api3_verify_mandatory($params, NULL, array(
+    array('case_id', 'contact_id', 'activity_id', 'contact_id')
+  ));
+
   $options = _civicrm_api3_get_options_from_params($params);
 
   // Get by id
@@ -258,8 +262,6 @@ SELECT DISTINCT case_id
     }
     return civicrm_api3_create_success($cases, $params, 'case', 'get');
   }
-
-  return civicrm_api3_create_error('Missing required parameter. Must provide case_id, contact_id, activity_id, or contact_id.');
 }
 
 /**
index b56317a744dfe4e278c713b5d7e65c1b0612d57f..ae1a04ad4d4420ed8ec923f039e614908df2bfba 100644 (file)
@@ -339,7 +339,6 @@ class api_v3_SyntaxConformanceAllEntitiesTest extends CiviUnitTestCase {
    */
   public function testSimple_get($Entity) {
     // $this->markTestSkipped("test gives core error on test server (but not on our locals). Skip until we can get server to pass");
-    return;
     if (in_array($Entity, $this->toBeImplemented['get'])) {
       return;
     }