function assertAttributesEquals($expectedValues, $actualValues, $message = NULL) {
foreach ($expectedValues as $paramName => $paramValue) {
if (isset($actualValues[$paramName])) {
- $this->assertEquals($paramValue, $actualValues[$paramName], "Value Mismatch On $paramName - value 1 is $paramValue value 2 is {$actualValues[$paramName]}");
+ $this->assertEquals($paramValue, $actualValues[$paramName], "Value Mismatch On $paramName - value 1 is " . print_r($paramValue, TRUE) . " value 2 is " . print_r($actualValues[$paramName], TRUE) );
}
else {
$this->fail("Attribute '$paramName' not present in actual array.");
return $this->callAPISuccess('Note', 'create', $params);
}
+ /**
+ * Enable CiviCampaign Component
+ */
+ function enableCiviCampaign() {
+ CRM_Core_BAO_ConfigSetting::enableComponent('CiviCampaign');
+ // force reload of config object
+ $config = CRM_Core_Config::singleton(TRUE, TRUE);
+ //flush cache by calling with reset
+ $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, TRUE, 'name', TRUE);
+ }
+
/**
* Create test generated example in api/v3/examples.
* To turn this off (e.g. on the server) set
protected $test_activity_type_value;
protected $_contactID;
- public $_eNoticeCompliant = TRUE;
/**
* Test setup for every test
*
* Test civicrm_activity_create() with valid parameters - use type_id
*/
function testActivityCreateCampaignTypeID() {
- CRM_Core_BAO_ConfigSetting::enableComponent('CiviCampaign');
- // force reload of config object
- $config = CRM_Core_Config::singleton(TRUE, TRUE);
- //flush cache by calling with reset
- $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, TRUE, 'name', TRUE);
+ $this->enableCiviCampaign();
$defaults = array();