protected function AcquiaLiftWebTestTarget::createTargetingAgent in Acquia Lift Connector 7
3 calls to AcquiaLiftWebTestTarget::createTargetingAgent()
File
- tests/
acquia_lift.test, line 3570 - Integration tests for Acquia Lift module.
Class
Code
protected function createTargetingAgent($label = NULL) {
AcquiaLiftAPI::setTestInstance();
if (empty($label)) {
$label = $this
->randomName();
}
$agent = new stdClass();
$agent->label = $label;
$agent->plugin = 'acquia_lift_target';
$agent->data = array();
$agent->machine_name = personalize_generate_machine_name($label, 'personalize_agent_machine_name_exists');
$agent = personalize_agent_save($agent);
$this
->resetAll();
return $agent;
}