Skip to content

Commit ceaa324

Browse files
committed
4268: Added more event filter tests
1 parent 6eae19e commit ceaa324

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed

tests/ApiPlatform/EventsFilterTest.php

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,32 @@ public static function getEventsProvider(): iterable
104104
];
105105

106106
// @todo Does tags filtering use the tag slug or name?
107-
// yield [
108-
// ['tags' => 'for børn'],
109-
// 0,
110-
// 'Events tagged with "for børn"',
111-
// ];
107+
// yield [
108+
// ['tags' => 'for børn'],
109+
// 0,
110+
// 'Events tagged with "for børn"',
111+
// ];
112112
//
113-
// yield [
114-
// ['tags' => 'for-boern'],
115-
// 1,
116-
// 'Events tagged with "for-boern"',
117-
// ];
113+
// yield [
114+
// ['tags' => 'for-boern'],
115+
// 1,
116+
// 'Events tagged with "for-boern"',
117+
// ];
118+
119+
// @todo It seems that filtering in tags use som sort of "contains word"
120+
// stuff, i.e. we can match the tag "for-boern" by filtering on "boern"
121+
// or on "for" – but not on "for-boern" …
122+
yield [
123+
['tags' => 'boern'],
124+
1,
125+
'Events tagged with "boern"',
126+
];
127+
128+
yield [
129+
['tags' => 'for'],
130+
2,
131+
'Events tagged with "for"',
132+
];
118133

119134
// Combined filters.
120135
yield [

tests/resources/events.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
"tags": [
5656
"aros",
5757
"theoceanraceaarhus",
58-
"ITKDev"
58+
"ITKDev",
59+
"for-dyr"
5960
],
6061
"imageUrls": {
6162
"small": "media\/cache\/resolve\/small\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png",
@@ -224,7 +225,8 @@
224225
"aros",
225226
"theoceanraceaarhus",
226227
"ITKDev",
227-
"For b\u00f8rn"
228+
"For b\u00f8rn",
229+
"for-boern"
228230
],
229231
"imageUrls": {
230232
"small": "media\/cache\/resolve\/small\/438d0b1f\/00bae8ff00e64832de73422f17a605ba391edc05b2458a786d4e8a11243e2162.png",

0 commit comments

Comments
 (0)