Skip to content

Commit

Permalink
AT-2285: fix contact list getting
Browse files Browse the repository at this point in the history
Co-authored-by: Laszlo Halasz <laszlo.halasz@emarsys.com>
  • Loading branch information
Adam Bozsoki and halaz-lazlo committed Jul 8, 2021
1 parent 7274087 commit cadb3ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Suite/Api/ContactList.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function findContactListByName(int $customerId, string $listName)
{
try {
foreach ($this->getContactLists($customerId) as $contactListData) {
if (trim(strtolower($contactListData['name'])) == strtolower($listName)) {
if (trim(strtolower($contactListData['name'])) == trim(strtolower($listName))) {
return $contactListData['id'];
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/unit/Suite/Api/ContactListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function findContactListByName_CasesDoNotMatch_ContactListIdStillReturned
$this->apiClient->expects($this->once())->method('get')->with($this->endPoints->contactLists($this->customerId))
->willReturn($this->apiSuccess($contactLists));

$contactListId = $this->listService->findContactListByName($this->customerId, trim(strtolower($contactListName)));
$contactListId = $this->listService->findContactListByName($this->customerId, $contactListName);

$this->assertEquals($this->contactListId, $contactListId);
}
Expand Down

0 comments on commit cadb3ed

Please sign in to comment.