*/
public $membershipTypeID;
+ /**
+ * Set up for tests.
+ */
public function setUp() {
parent::setUp();
$this->membershipTypeID = $this->membershipTypeCreate(array('name' => 'General'));
$this->assertDBState('CRM_Core_DAO_Job', $result['id'], $this->_params);
}
- /**
- * Check with empty array.
- */
- public function testDeleteEmpty() {
- $params = array();
- $result = $this->callAPIFailure('job', 'delete', $params);
- }
-
- /**
- * Check with No array.
- */
- public function testDeleteParamsNotArray() {
- $result = $this->callAPIFailure('job', 'delete', 'string');
- }
-
/**
* Check if required fields are not passed.
*/
$params = array(
'id' => 'abcd',
);
- $result = $this->callAPIFailure('job', 'delete', $params);
+ $this->callAPIFailure('job', 'delete', $params);
}
/**
public function testDelete() {
$createResult = $this->callAPISuccess('job', 'create', $this->_params);
$params = array('id' => $createResult['id']);
- $result = $this->callAPIAndDocument('job', 'delete', $params, __FUNCTION__, __FILE__);
+ $this->callAPIAndDocument('job', 'delete', $params, __FUNCTION__, __FILE__);
$this->assertAPIDeleted($this->_entity, $createResult['id']);
}
* Note that this test is about tesing the metadata / calling of the function & doesn't test the success of the called function
*/
public function testCallUpdateGreetingSuccess() {
- $result = $this->callAPISuccess($this->_entity, 'update_greeting', array(
+ $this->callAPISuccess($this->_entity, 'update_greeting', array(
'gt' => 'postal_greeting',
'ct' => 'Individual',
));
public function testCallUpdateGreetingCommaSeparatedParamsSuccess() {
$gt = 'postal_greeting,email_greeting,addressee';
$ct = 'Individual,Household';
- $result = $this->callAPISuccess($this->_entity, 'update_greeting', array('gt' => $gt, 'ct' => $ct));
+ $this->callAPISuccess($this->_entity, 'update_greeting', array('gt' => $gt, 'ct' => $ct));
}
/**
for ($i = 1; $i <= $createTotal; $i++) {
$contactID = $this->individualCreate();
$groupID = $this->groupCreate(array('name' => $i, 'title' => $i));
- $result = $this->callAPISuccess('action_schedule', 'create', array(
+ $this->callAPISuccess('action_schedule', 'create', array(
'title' => " job $i",
'subject' => "job $i",
'entity_value' => $membershipTypeID,
'group_id' => $groupID,
));
}
- $result = $this->callAPISuccess('job', 'send_reminder', array());
+ $this->callAPISuccess('job', 'send_reminder', array());
$successfulCronCount = CRM_Core_DAO::singleValueQuery("SELECT count(*) FROM civicrm_action_log");
$this->assertEquals($successfulCronCount, $createTotal);
}