Merge pull request #4635 from colemanw/comments
[civicrm-core.git] / tests / phpunit / api / v3 / EventTest.php
index 1769fc7f637ff86695690a5a8799b507e93f1779..eff60ed6c38cf53d57733f6b611d01fec895c78f 100644 (file)
@@ -188,9 +188,9 @@ class api_v3_EventTest extends CiviUnitTestCase {
   */
 
 
-  /*
-     * Test 'is.Current' option. Existing event is 'old' so only current should be returned
-     */
+  /**
+   * Test 'is.Current' option. Existing event is 'old' so only current should be returned
+   */
   function testGetIsCurrent() {
     $params = array(
       'isCurrent' => 1,
@@ -209,9 +209,10 @@ class api_v3_EventTest extends CiviUnitTestCase {
     $this->assertEquals(3, $allEvents['count'], 'confirm three events exist (ie. two not found) ' . __LINE__);
     $this->assertEquals($currentEvent['id'], $result['id'], '');
   }
-/*
- * There has been a schema change & the api needs to buffer developers from it
- */
+
+  /**
+   * There has been a schema change & the api needs to buffer developers from it
+   */
   function testGetPaymentProcessorId() {
     $params = $this->_params[0];
     $params['payment_processor_id'] = 1;
@@ -230,9 +231,9 @@ class api_v3_EventTest extends CiviUnitTestCase {
 
   }
 
-  /*
-     * Test 'is.Current' option. Existing event is 'old' so only current should be returned
-     */
+  /**
+   * Test 'is.Current' option. Existing event is 'old' so only current should be returned
+   */
   function testGetSingleReturnIsFull() {
     $contactID = $this->individualCreate();
     $params = array(
@@ -275,7 +276,7 @@ class api_v3_EventTest extends CiviUnitTestCase {
   ///////////////// civicrm_event_create methods
 
   /**
-   * check with complete array + custom field
+   * Check with complete array + custom field
    * Note that the test is written on purpose without any
    * variables specific to participant so it can be replicated into other entities
    * and / or moved to the automated test suite
@@ -343,9 +344,10 @@ class api_v3_EventTest extends CiviUnitTestCase {
     $this->assertEquals('2008-06-01 00:00:00', $result['values'][$result['id']]['registration_start_date'], 'start date is not set in line ' . __LINE__);
     $this->assertEquals('2008-10-15 00:00:00', $result['values'][$result['id']]['registration_end_date'], 'end date is not set in line ' . __LINE__);
   }
-  /*
-     * Test that passing in Unique field names works
-     */
+
+  /**
+   * Test that passing in Unique field names works
+   */
   function testCreateEventSuccessUniqueFieldNames() {
     $this->_params[0]['event_start_date'] = $this->_params[0]['start_date'];
     unset($this->_params[1]['start_date']);
@@ -390,7 +392,7 @@ class api_v3_EventTest extends CiviUnitTestCase {
   }
 
   /**
-   * check event_id still supported for delete
+   * Check event_id still supported for delete
    */
   function testDeleteWithEventId() {
     $params = array(
@@ -398,9 +400,10 @@ class api_v3_EventTest extends CiviUnitTestCase {
     $result = $this->callAPISuccess('Event', 'Delete', $params);
     $this->assertAPISuccess($result, 'in line ' . __LINE__);
   }
-  /*
-     * Trying to delete an event with participants should return error
-     */
+
+  /**
+   * Trying to delete an event with participants should return error
+   */
   function testDeleteWithExistingParticipant() {
     $contactID = $this->individualCreate();
     $participantID = $this->participantCreate(
@@ -500,28 +503,29 @@ class api_v3_EventTest extends CiviUnitTestCase {
   }
 
   function testgetfields() {
-    $description = "demonstrate use of getfields to interogate api";
+    $description = "demonstrate use of getfields to interrogate api";
     $params = array('action' => 'create');
     $result = $this->callAPISuccess('event', 'getfields', $params);
     $this->assertEquals(1, $result['values']['title']['api.required'], 'in line ' . __LINE__);
   }
-  /*
-     * test api_action param also works
-     */
+
+  /**
+   * Test api_action param also works
+   */
   function testgetfieldsRest() {
-    $description = "demonstrate use of getfields to interogate api";
+    $description = "demonstrate use of getfields to interrogate api";
     $params = array('api_action' => 'create');
     $result = $this->callAPISuccess('event', 'getfields', $params);
     $this->assertEquals(1, $result['values']['title']['api.required'], 'in line ' . __LINE__);
   }
   function testgetfieldsGet() {
-    $description = "demonstrate use of getfields to interogate api";
+    $description = "demonstrate use of getfields to interrogate api";
     $params = array('action' => 'get');
     $result = $this->callAPISuccess('event', 'getfields', $params);
     $this->assertEquals('title', $result['values']['event_title']['name'], 'in line ' . __LINE__);
   }
   function testgetfieldsDelete() {
-    $description = "demonstrate use of getfields to interogate api";
+    $description = "demonstrate use of getfields to interrogate api";
     $params = array('action' => 'delete');
     $result = $this->callAPISuccess('event', 'getfields', $params);
     $this->assertEquals(1, $result['values']['id']['api.required']);