*/
- /*
- * 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,
$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;
}
- /*
- * 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(
///////////////// 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
$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']);
}
/**
- * check event_id still supported for delete
+ * Check event_id still supported for delete
*/
function testDeleteWithEventId() {
$params = array(
$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(
$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 interrogate api";
$params = array('api_action' => 'create');