Skip to content

Commit cadb3ed

Browse files
Adam Bozsokihalaz-lazlo
Adam Bozsoki
andcommitted
AT-2285: fix contact list getting
Co-authored-by: Laszlo Halasz <laszlo.halasz@emarsys.com>
1 parent 7274087 commit cadb3ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Suite/Api/ContactList.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function findContactListByName(int $customerId, string $listName)
5555
{
5656
try {
5757
foreach ($this->getContactLists($customerId) as $contactListData) {
58-
if (trim(strtolower($contactListData['name'])) == strtolower($listName)) {
58+
if (trim(strtolower($contactListData['name'])) == trim(strtolower($listName))) {
5959
return $contactListData['id'];
6060
}
6161
}

test/unit/Suite/Api/ContactListTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function findContactListByName_CasesDoNotMatch_ContactListIdStillReturned
141141
$this->apiClient->expects($this->once())->method('get')->with($this->endPoints->contactLists($this->customerId))
142142
->willReturn($this->apiSuccess($contactLists));
143143

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

146146
$this->assertEquals($this->contactListId, $contactListId);
147147
}

0 commit comments

Comments
 (0)