@@ -147,6 +147,76 @@ public function testGetCustomValueValueExpression(): void
147
147
]
148
148
);
149
149
150
+ $ this ->assertMatchWhere (
151
+ 'test_value.value LIKE :par5 ' ,
152
+ [
153
+ 'glue ' => 'and ' ,
154
+ 'field ' => 'cmf_ ' .$ this ->getFixtureById ('custom_field1 ' )->getId (),
155
+ 'object ' => 'custom_object ' ,
156
+ 'type ' => 'datetime ' ,
157
+ 'operator ' => 'like ' ,
158
+ 'properties ' => [
159
+ 'filter ' => '2024 ' ,
160
+ ],
161
+ ]
162
+ );
163
+
164
+ $ this ->assertMatchWhere (
165
+ 'test_value.value REGEXP :par6 ' ,
166
+ [
167
+ 'glue ' => 'and ' ,
168
+ 'field ' => 'cmf_ ' .$ this ->getFixtureById ('custom_field1 ' )->getId (),
169
+ 'object ' => 'custom_object ' ,
170
+ 'type ' => 'datetime ' ,
171
+ 'operator ' => 'regexp ' ,
172
+ 'properties ' => [
173
+ 'filter ' => '2024 ' ,
174
+ ],
175
+ ]
176
+ );
177
+
178
+ $ this ->assertMatchWhere (
179
+ 'test_value.value LIKE :par7 ' ,
180
+ [
181
+ 'glue ' => 'and ' ,
182
+ 'field ' => 'cmf_ ' .$ this ->getFixtureById ('custom_field1 ' )->getId (),
183
+ 'object ' => 'custom_object ' ,
184
+ 'type ' => 'datetime ' ,
185
+ 'operator ' => 'startsWith ' ,
186
+ 'properties ' => [
187
+ 'filter ' => '2024 ' ,
188
+ ],
189
+ ]
190
+ );
191
+
192
+ $ this ->assertMatchWhere (
193
+ 'test_value.value LIKE :par8 ' ,
194
+ [
195
+ 'glue ' => 'and ' ,
196
+ 'field ' => 'cmf_ ' .$ this ->getFixtureById ('custom_field1 ' )->getId (),
197
+ 'object ' => 'custom_object ' ,
198
+ 'type ' => 'datetime ' ,
199
+ 'operator ' => 'endsWith ' ,
200
+ 'properties ' => [
201
+ 'filter ' => '2024 ' ,
202
+ ],
203
+ ]
204
+ );
205
+
206
+ $ this ->assertMatchWhere (
207
+ 'test_value.value LIKE :par9 ' ,
208
+ [
209
+ 'glue ' => 'and ' ,
210
+ 'field ' => 'cmf_ ' .$ this ->getFixtureById ('custom_field1 ' )->getId (),
211
+ 'object ' => 'custom_object ' ,
212
+ 'type ' => 'datetime ' ,
213
+ 'operator ' => 'contains ' ,
214
+ 'properties ' => [
215
+ 'filter ' => '2024 ' ,
216
+ ],
217
+ ]
218
+ );
219
+
150
220
$ this ->assertMatchWhere (
151
221
'test_value.value IS NULL ' ,
152
222
[
0 commit comments