@@ -1229,14 +1229,21 @@ public function testFilters()
1229
1229
'required ' => false ,
1230
1230
'strategy ' => 'partial ' ,
1231
1231
]]),
1232
+ 'f3 ' => new DummyFilter (['toto ' => [
1233
+ 'property ' => 'name ' ,
1234
+ 'type ' => 'array ' ,
1235
+ 'is_collection ' => true ,
1236
+ 'required ' => true ,
1237
+ 'strategy ' => 'exact ' ,
1238
+ ]]),
1232
1239
];
1233
1240
1234
1241
foreach ($ filters as $ filterId => $ filter ) {
1235
1242
$ filterLocatorProphecy ->has ($ filterId )->willReturn (true )->shouldBeCalled ();
1236
1243
$ filterLocatorProphecy ->get ($ filterId )->willReturn ($ filter )->shouldBeCalled ();
1237
1244
}
1238
1245
1239
- $ filterLocatorProphecy ->has ('f3 ' )->willReturn (false )->shouldBeCalled ();
1246
+ $ filterLocatorProphecy ->has ('f4 ' )->willReturn (false )->shouldBeCalled ();
1240
1247
1241
1248
$ this ->normalizeWithFilters ($ filterLocatorProphecy ->reveal ());
1242
1249
}
@@ -1261,6 +1268,13 @@ public function testFiltersWithDeprecatedFilterCollection()
1261
1268
'required ' => false ,
1262
1269
'strategy ' => 'partial ' ,
1263
1270
]]),
1271
+ 'f3 ' => new DummyFilter (['toto ' => [
1272
+ 'property ' => 'name ' ,
1273
+ 'type ' => 'array ' ,
1274
+ 'is_collection ' => true ,
1275
+ 'required ' => true ,
1276
+ 'strategy ' => 'exact ' ,
1277
+ ]]),
1264
1278
]));
1265
1279
}
1266
1280
@@ -1651,7 +1665,7 @@ private function normalizeWithFilters($filterLocator)
1651
1665
'This is a dummy. ' ,
1652
1666
null ,
1653
1667
[],
1654
- ['get ' => ['method ' => 'GET ' , 'filters ' => ['f1 ' , 'f2 ' , 'f3 ' ]]],
1668
+ ['get ' => ['method ' => 'GET ' , 'filters ' => ['f1 ' , 'f2 ' , 'f3 ' , ' f4 ' ]]],
1655
1669
[]
1656
1670
);
1657
1671
$ resourceMetadataFactoryProphecy = $ this ->prophesize (ResourceMetadataFactoryInterface::class);
@@ -1716,6 +1730,16 @@ private function normalizeWithFilters($filterLocator)
1716
1730
'required ' => false ,
1717
1731
'type ' => 'integer ' ,
1718
1732
],
1733
+ [
1734
+ 'name ' => 'toto ' ,
1735
+ 'in ' => 'query ' ,
1736
+ 'required ' => true ,
1737
+ 'type ' => 'array ' ,
1738
+ 'items ' => [
1739
+ 'type ' => 'string ' ,
1740
+ ],
1741
+ 'collectionFormat ' => 'csv ' ,
1742
+ ],
1719
1743
[
1720
1744
'name ' => 'page ' ,
1721
1745
'in ' => 'query ' ,
0 commit comments