From 1e4d085954a3a6c8af69d8cba6c888446666e647 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 25 Mar 2013 21:10:58 -0400 Subject: [PATCH] SyntaxConformanceAllEntitiesTest - Re-enable testSimple_get() and fix failure for Case.get. --- api/v3/Case.php | 6 ++++-- tests/phpunit/api/v3/SyntaxConformanceAllEntitiesTest.php | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/v3/Case.php b/api/v3/Case.php index 7e465b482d..5f6d4d0deb 100644 --- a/api/v3/Case.php +++ b/api/v3/Case.php @@ -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.'); } /** diff --git a/tests/phpunit/api/v3/SyntaxConformanceAllEntitiesTest.php b/tests/phpunit/api/v3/SyntaxConformanceAllEntitiesTest.php index b56317a744..ae1a04ad4d 100644 --- a/tests/phpunit/api/v3/SyntaxConformanceAllEntitiesTest.php +++ b/tests/phpunit/api/v3/SyntaxConformanceAllEntitiesTest.php @@ -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; } -- 2.25.1