SyntaxConformanceTest - Fix for entities which don't support delete
authorTim Otten <totten@civicrm.org>
Mon, 24 Mar 2014 23:24:40 +0000 (16:24 -0700)
committerTim Otten <totten@civicrm.org>
Sun, 6 Apr 2014 02:31:12 +0000 (19:31 -0700)
api/v3/DashboardContact.php
tests/phpunit/api/v3/SyntaxConformanceTest.php

index ca3605aca338a3f2a95589e703c94e8fbe663d64..0bb8ee893e6e2154aca773863c3fd5cf8372b37b 100644 (file)
@@ -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);
+}
index 80422b27e0d6831223502c1a82052131c852e364..43a0b1f2db4f8f8f7fdffa9c4659547d47a7eac4 100644 (file)
@@ -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;
     }