From: Tim Otten Date: Thu, 11 Jul 2013 04:35:51 +0000 (-0700) Subject: APIv3 - getFields - Add unit-test for 'get_options=all' X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=41d89fcb4338884fe56ed12fb7ebd34ba05b3c23;p=civicrm-core.git APIv3 - getFields - Add unit-test for 'get_options=all' --- diff --git a/tests/phpunit/api/v3/UtilsTest.php b/tests/phpunit/api/v3/UtilsTest.php index e00b2fd3c8..787ff6e1fb 100644 --- a/tests/phpunit/api/v3/UtilsTest.php +++ b/tests/phpunit/api/v3/UtilsTest.php @@ -254,5 +254,17 @@ class api_v3_UtilsTest extends CiviUnitTestCase { $result = civicrm_api('event', 'getfields', array('version' => 3)); $this->assertArrayHasKey('values', $result); } + + function testGetFields_AllOptions() { + $result = civicrm_api('contact', 'getfields', array( + 'options' => array( + 'get_options' => 'all', + ), + 'version' => 3 + )); + $this->assertAPISuccess($result); + $this->assertEquals('Household', $result['values']['contact_type']['options']['Household']); + $this->assertEquals('HTML', $result['values']['preferred_mail_format']['options']['HTML']); + } }