From 510513d8429b831568699223fe325d3de98bfa58 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 24 Mar 2014 16:24:40 -0700 Subject: [PATCH] SyntaxConformanceTest - Fix for entities which don't support delete --- api/v3/DashboardContact.php | 15 ++++++++++++++- tests/phpunit/api/v3/SyntaxConformanceTest.php | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/api/v3/DashboardContact.php b/api/v3/DashboardContact.php index ca3605aca3..0bb8ee893e 100644 --- a/api/v3/DashboardContact.php +++ b/api/v3/DashboardContact.php @@ -92,4 +92,17 @@ function _civicrm_api3_dashboard_contact_check_params(&$params) { } } return NULL; -} \ No newline at end of file +} + +/** + * Delete an existing dashboard-contact + * + * This method is used to delete any existing dashboard-board. the id of the dashboard-contact + * is required field in $params array + * + * {@getfields dashboard_contact_delete} + * @access public + */ +function civicrm_api3_dashboard_contact_delete($params) { + return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); +} diff --git a/tests/phpunit/api/v3/SyntaxConformanceTest.php b/tests/phpunit/api/v3/SyntaxConformanceTest.php index 80422b27e0..43a0b1f2db 100644 --- a/tests/phpunit/api/v3/SyntaxConformanceTest.php +++ b/tests/phpunit/api/v3/SyntaxConformanceTest.php @@ -153,7 +153,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase { } public static function toBeSkipped_delete($sequential = FALSE) { - $entitiesWithout = array('MailingGroup', 'Constant', 'Entity', 'Location', 'Domain', 'Profile', 'CustomValue'); + $entitiesWithout = array('MailingContact', 'MailingEventConfirm', 'MailingEventResubscribe', 'MailingEventSubscribe', 'MailingEventUnsubscribe', 'MailingGroup', 'MailingRecipients', 'Constant', 'Entity', 'Location', 'Domain', 'Profile', 'CustomValue', 'Setting'); if ($sequential === TRUE) { return $entitiesWithout; } -- 2.25.1