Skip to content
Snippets Groups Projects
Commit 41d89fcb authored by totten's avatar totten
Browse files

APIv3 - getFields - Add unit-test for 'get_options=all'

parent ed8abbbb
No related branches found
No related tags found
No related merge requests found
...@@ -254,5 +254,17 @@ class api_v3_UtilsTest extends CiviUnitTestCase { ...@@ -254,5 +254,17 @@ class api_v3_UtilsTest extends CiviUnitTestCase {
$result = civicrm_api('event', 'getfields', array('version' => 3)); $result = civicrm_api('event', 'getfields', array('version' => 3));
$this->assertArrayHasKey('values', $result); $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']);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment