Mailing - Add APIv3 get actions to make syntaxConformanceTest happy
authorColeman Watts <coleman@civicrm.org>
Fri, 18 Nov 2022 00:39:45 +0000 (19:39 -0500)
committerColeman Watts <coleman@civicrm.org>
Fri, 18 Nov 2022 02:57:33 +0000 (21:57 -0500)
api/v3/MailingEventConfirm.php
api/v3/MailingEventSubscribe.php
api/v3/MailingEventUnsubscribe.php
tests/phpunit/api/v3/SyntaxConformanceTest.php

index a9830686b8270a2432ab5a8ef49ad6f9ae9d2003..5ceeedcc59b7ddc1d72e514e095db17e33ee7c08 100644 (file)
  * @package CiviCRM_APIv3
  */
 
+/**
+ * Get mailing event confirm record.
+ *
+ * @param array $params
+ *
+ * @return array
+ */
+function civicrm_api3_mailing_event_confirm_get($params) {
+  return _civicrm_api3_basic_get('CRM_Mailing_Event_BAO_MailingEventConfirm', $params);
+}
+
 /**
  * Handle a confirm event.
  *
index 7648f9044666e799f1acf6dbed86e20993b8464b..4bf80a75c986e6340d6a98eaf46e0b833d140da0 100644 (file)
  * @package CiviCRM_APIv3
  */
 
+/**
+ * Get mailing event subscribe record.
+ *
+ * @param array $params
+ *
+ * @return array
+ */
+function civicrm_api3_mailing_event_subscribe_get($params) {
+  return _civicrm_api3_basic_get('CRM_Mailing_Event_BAO_MailingEventSubscribe', $params);
+}
+
 /**
  * Subscribe from mailing group.
  *
index 670b41b803a4b843a04d13ca55d6bede1d16c8ba..56ac663ba191969ea96a0c9a65ba028e39c856a0 100644 (file)
  * @package CiviCRM_APIv3
  */
 
+/**
+ * Get mailing event unsubscribe record.
+ *
+ * @param array $params
+ *
+ * @return array
+ */
+function civicrm_api3_mailing_event_unsubscribe_get($params) {
+  return _civicrm_api3_basic_get('CRM_Mailing_Event_BAO_MailingEventUnsubscribe', $params);
+}
+
 /**
  * Unsubscribe from mailing group.
  *
index 45d682297051e4182b0accec2fd0b6e687b110b2..4dbb0434da985575c8db155a42042d278f179353 100644 (file)
@@ -285,10 +285,7 @@ class api_v3_SyntaxConformanceTest extends CiviUnitTestCase {
    */
   public static function toBeSkipped_get($sequential = FALSE) {
     $entitiesWithoutGet = [
-      'MailingEventSubscribe',
-      'MailingEventConfirm',
       'MailingEventResubscribe',
-      'MailingEventUnsubscribe',
       'Location',
     ];
     if ($sequential === TRUE) {