return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
-/**
- * Adjust metadata for navigation create action.
- *
- * @param array $params
- */
-function _civicrm_api3_navigation_create_spec(&$params) {
- $params['domain_id']['api.default'] = CRM_Core_Config::domainID();
- $params['domain_id']['type'] = CRM_Utils_Type::T_INT;
- $params['domain_id']['title'] = 'Domain ID';
-}
-
/**
* Create navigation item.
*
$this->getAndCheck($params, $result['id'], $this->_entity, TRUE);
}
+ /**
+ * Test create function.
+ */
+ public function testDefaultDomain() {
+ $params = array('label' => 'Herd the Cats');
+ $result = $this->callAPISuccess($this->_entity, 'create', $params);
+ // Check domain_id has been set per default
+ $params['domain_id'] = CRM_Core_Config::domainID();
+ $this->getAndCheck($params, $result['id'], $this->_entity, TRUE);
+ }
+
/**
* Test delete function.
*/