Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Commit

Permalink
Merge pull request #27 from Talamasca/TriggerCampaignForUserAndAction…
Browse files Browse the repository at this point in the history
…ListItem3

add ListID in Transport config
  • Loading branch information
methylbro authored Jun 15, 2017
2 parents a9ff1b1 + 59d7955 commit 76fb92d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/Transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ public function subscribe(Properties $user, $idKey = 'ID')
* @param Properties $inputData
* @param array $actionProperties
*/
public function TriggerCampaignForUserAndActionListItemWithResult($userId, Properties $inputData, array $actionProperties = [])
public function triggerCampaignForUserAndActionListItemWithResult($userId, Properties $inputData, array $actionProperties = [])
{
$options['Actioncode'] = $actionProperties['Actioncode'];
$options['ActionCode'] = $actionProperties['Actioncode'];
$options['ActionListID'] = $actionProperties['ActionListID'];
$options['ActionListItemData'] = $inputData;

Expand All @@ -227,7 +227,7 @@ public function TriggerCampaignForUserAndActionListItemWithResult($userId, Prope
* @param int $userId
* @param Properties $inputData
*/
public function TriggerCampaignForUserWithResult($userId, Properties $inputData)
public function triggerCampaignForUserWithResult($userId, Properties $inputData)
{
$options['InputData'] = $inputData;

Expand Down Expand Up @@ -283,6 +283,7 @@ private function getOptions($userId)
{
$options = [
'List' => $this->list,
'ListID' => $this->list,
'UserID' => $userId,
'GateName' => $this->campaign,
];
Expand Down
10 changes: 6 additions & 4 deletions tests/TransportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ protected function buildClientForTriggerCampaign($listId, $listName, $campaign,
->method('TriggerCampaignForUserWithResult')
->with($this->equalTo([
'List' => $listId,
'ListID' => $listId,
'UserID' => $userId,
'GateName' => $campaign,
'InputData' => $inputData,
Expand All @@ -189,9 +190,10 @@ protected function buildClientForTriggerCampaign($listId, $listName, $campaign,
$this->equalTo(
[
'List' => $listId,
'ListID' => $listId,
'UserID' => $userId,
'GateName' => $campaign,
'Actioncode' => $actionProperties['Actioncode'],
'ActionCode' => $actionProperties['Actioncode'],
'ActionListID' => $actionProperties['ActionListID'],
'ActionListItemData' => $inputData,
]
Expand Down Expand Up @@ -224,7 +226,7 @@ public function testTriggerCampaign()

$transport = new Transport($client, $listName, $campaign);
$transport->setLogger($logger);
$result = $transport->TriggerCampaignForUserWithResult($userId, $inputData);
$result = $transport->triggerCampaignForUserWithResult($userId, $inputData);

$this->assertEquals($TriggerCampaignResult, $result);
}
Expand Down Expand Up @@ -254,7 +256,7 @@ public function testTriggerCampaignActionList()

$transport = new Transport($client, $listName, $campaign);
$transport->setLogger($logger);
$result = $transport->TriggerCampaignForUserAndActionListItemWithResult($userId, $inputData, $actionProperties);
$result = $transport->triggerCampaignForUserAndActionListItemWithResult($userId, $inputData, $actionProperties);

$this->assertEquals($TriggerCampaignResult, $result);
}
Expand Down Expand Up @@ -284,7 +286,7 @@ public function testTriggerCampaignWithException()

$this->setExpectedException('\Exception');

$result = $transport->TriggerCampaignForUserWithResult($userId, $inputData);
$result = $transport->triggerCampaignForUserWithResult($userId, $inputData);
}

protected function buildClientForSubscribe($listId, $listName, $campaign, $user, $userProperties, $GetUserByFilterResponseCode, $CreateUserResponseCode)
Expand Down

0 comments on commit 76fb92d

Please sign in to comment.