From 41d89fcb4338884fe56ed12fb7ebd34ba05b3c23 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 10 Jul 2013 21:35:51 -0700 Subject: [PATCH] APIv3 - getFields - Add unit-test for 'get_options=all' --- tests/phpunit/api/v3/UtilsTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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']); + } } -- 2.25.1