From 6a77ff3d441d5a9c60221eaf25ca0a6506e721ed Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 12 Jun 2013 15:52:07 -0700 Subject: [PATCH] Add test for option-value name matching --- tests/phpunit/api/v3/CaseTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/api/v3/CaseTest.php b/tests/phpunit/api/v3/CaseTest.php index 5ce11baef6..a7b4c90369 100644 --- a/tests/phpunit/api/v3/CaseTest.php +++ b/tests/phpunit/api/v3/CaseTest.php @@ -298,7 +298,10 @@ class api_v3_CaseTest extends CiviUnitTestCase { */ function testCaseUpdate() { // Create Case - $result = civicrm_api('case', 'create', $this->_params); + $params = $this->_params; + // Test using name instead of value + $params['case_type_id'] = 'housing_support'; + $result = civicrm_api('case', 'create', $params); $this->assertAPISuccess($result, 'in line ' . __LINE__); $id = $result['id']; $result = civicrm_api('case', 'get', array('version' => $this->_apiversion, 'id' => $id)); -- 2.25.1