Skip to content

Commit cc3fa3b

Browse files
committed
Merge remote-tracking branch 'origin/beta' into development
2 parents fb77873 + d3e3241 commit cc3fa3b

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Tests/Functional/Helper/QueryFilterHelperTest.php

+36
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,42 @@ public function testGetCustomValueValueExpression(): void
368368
],
369369
(new DateTime('tomorrow'))->format('Y-m-d 23:59:59')
370370
);
371+
372+
$this->assertMatchWhere(
373+
'test_value.value >= :pard',
374+
[
375+
'glue' => 'and',
376+
'field' => 'cmf_'.$this->getFixtureById('custom_object_product')->getId(),
377+
'object' => 'custom_object',
378+
'type' => 'date',
379+
'operator' => 'gte',
380+
'properties' => [
381+
'filter' => [
382+
'dateTypeMode' => 'absolute',
383+
'absoluteDate' => 'yesterday',
384+
],
385+
],
386+
],
387+
(new DateTime('yesterday'))->format('Y-m-d')
388+
);
389+
390+
$this->assertMatchWhere(
391+
'test_value.value <= :pare',
392+
[
393+
'glue' => 'and',
394+
'field' => 'cmf_'.$this->getFixtureById('custom_object_product')->getId(),
395+
'object' => 'custom_object',
396+
'type' => 'datetime',
397+
'operator' => 'lte',
398+
'properties' => [
399+
'filter' => [
400+
'dateTypeMode' => 'absolute',
401+
'absoluteDate' => 'tomorrow',
402+
],
403+
],
404+
],
405+
(new DateTime('tomorrow'))->format('Y-m-d 23:59:59')
406+
);
371407
}
372408

373409
protected function assertMatchWhere(string $expectedWhere, array $filter, ?string $expectedValue = null): void

0 commit comments

Comments
 (0)