Skip to content

Commit

Permalink
added test case for where assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
aarohiprasad committed Jun 4, 2024
1 parent 88046c3 commit fc96692
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Tests/Functional/Helper/QueryFilterHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,23 @@ public function testGetCustomValueValueExpression(): void
],
]
);

$this->assertMatchWhere(
'test_value.value BETWEEN 0 AND 10',
[
'glue' => 'and',
'field' => 'cmf_'.$this->getFixtureById('custom_object_product')->getId(),
'object' => 'custom_object',
'type' => 'int',
'operator' => 'between',
'properties' => [
'filter' => [
'number_from' => 0,
'number_to' => 10,
],
],
]
);
}

protected function assertMatchWhere(string $expectedWhere, array $filter): void
Expand Down

0 comments on commit fc96692

Please sign in to comment.