Skip to content

Commit d3e3241

Browse files
committed
Merge remote-tracking branch 'origin/staging' into beta
2 parents 6a75e4b + 467455c commit d3e3241

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
@@ -351,6 +351,42 @@ public function testGetCustomValueValueExpression(): void
351351
],
352352
(new DateTime('tomorrow'))->format('Y-m-d 23:59:59')
353353
);
354+
355+
$this->assertMatchWhere(
356+
'test_value.value >= :pard',
357+
[
358+
'glue' => 'and',
359+
'field' => 'cmf_'.$this->getFixtureById('custom_object_product')->getId(),
360+
'object' => 'custom_object',
361+
'type' => 'date',
362+
'operator' => 'gte',
363+
'properties' => [
364+
'filter' => [
365+
'dateTypeMode' => 'absolute',
366+
'absoluteDate' => 'yesterday',
367+
],
368+
],
369+
],
370+
(new DateTime('yesterday'))->format('Y-m-d')
371+
);
372+
373+
$this->assertMatchWhere(
374+
'test_value.value <= :pare',
375+
[
376+
'glue' => 'and',
377+
'field' => 'cmf_'.$this->getFixtureById('custom_object_product')->getId(),
378+
'object' => 'custom_object',
379+
'type' => 'datetime',
380+
'operator' => 'lte',
381+
'properties' => [
382+
'filter' => [
383+
'dateTypeMode' => 'absolute',
384+
'absoluteDate' => 'tomorrow',
385+
],
386+
],
387+
],
388+
(new DateTime('tomorrow'))->format('Y-m-d 23:59:59')
389+
);
354390
}
355391

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

0 commit comments

Comments
 (0)