Skip to content

Commit

Permalink
Fix tests after merging
Browse files Browse the repository at this point in the history
  • Loading branch information
volha-pivavarchyk committed Oct 17, 2024
1 parent cd4f4df commit 01a6620
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion EventListener/ApiSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private function getCustomObjectsFromContactCreateRequest(array $entityRequestPa
throw new InvalidArgumentException('Custom Object Plugin is disabled');
}

if (1 !== preg_match('~^'.preg_quote(LeadApiController::class, '~').'::(new|edit)(Entity|Entities)Action$~i', $request->attributes->get('_controller'))) {
if (1 !== preg_match('~^'.preg_quote(LeadApiController::class, '~').'(::|:)(new|edit)(Entity|Entities)Action$~i', $request->attributes->get('_controller'))) {
throw new InvalidArgumentException('Not a API request we care about');
}

Expand Down
3 changes: 1 addition & 2 deletions EventListener/SegmentFiltersMergeSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public static function getSubscribedEvents(): array
* When \Mautic\LeadBundle\LeadEvents::LIST_FILTERS_MERGE is available in mautic\mautic,
* we can use it here instead of string.
*/
// \Mautic\LeadBundle\LeadEvents::LIST_FILTERS_MERGE => 'mergeCustomObjectFilters'
'mautic.list_filters_merge' => 'mergeCustomObjectFilters',
\Mautic\LeadBundle\LeadEvents::LIST_FILTERS_MERGE => 'mergeCustomObjectFilters'
];
}

Expand Down
2 changes: 1 addition & 1 deletion Helper/QueryFilterHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public function createMergeFilterQuery(
$segmentFilterFieldType = $filter['type'] ?: $this->queryFilterFactory
->getCustomFieldTypeById($segmentFilterFieldId);
$dataTable = $this->queryFilterFactory->getTableNameFromType($segmentFilterFieldType);
$segmentMergedFilter = $filter['filter'];
$segmentMergedFilter = $segmentFilter;
$segmentFilterFieldOperator = (string) $filter['operator'];

$alias = $customItemXrefContactAlias.'_'.$segmentFilterFieldId.'_'.$filter['type'];
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Token/EmailTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function testEmailTokens(): void
Datetime: 2020-07-22 14:55:00, 2020-07-23 14:55:00
Email: product@a.email, product@b.email
Hidden: hidden secret, top secret
Number: 0, 123, 456
Number: 123, 456
Phone: +420555666777, +420555666888
Select: Option A, Option B
Multiselect: "Option A","Option B", "Option B"
Expand All @@ -188,7 +188,7 @@ public function testEmailTokens(): void
Datetime: <ol><li>2020-07-22 14:55:00</li><li>2020-07-23 14:55:00</li></ol>
Email:
Hidden: <ul><li>hidden secret</li><li>top secret</li></ul>
Number: 0,123 and 456
Number: 123 and 456
Phone: +420555666777, +420555666888
Select: <ol><li>Option A</li><li>Option B</li></ol>
Multiselect: <ol><li>"Option A","Option B"</li><li>"Option B"</li></ol>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function testDynamicContentEmail(): void
], [
'nexonempty@acquia.com',
$this->buildDynamicContentArray([['nexon-text', '', 'empty']]),
'Default Dynamic Content',
'Custom Object Dynamic Content',
], [
'nexonnotempty@acquia.com',
$this->buildDynamicContentArray([['nexon-text', '', '!empty']]),
Expand Down

0 comments on commit 01a6620

Please sign in to comment.