| @@ 1160-1176 (lines=17) @@ | ||
| 1157 | ); |
|
| 1158 | } |
|
| 1159 | ||
| 1160 | public function testUserMetadataFilterOwnerWrongUserId() |
|
| 1161 | { |
|
| 1162 | $this->assertSearchResults( |
|
| 1163 | [], |
|
| 1164 | $this->getContentSearchHandler()->findContent( |
|
| 1165 | new Query( |
|
| 1166 | [ |
|
| 1167 | 'filter' => new Criterion\UserMetadata( |
|
| 1168 | Criterion\UserMetadata::OWNER, |
|
| 1169 | Criterion\Operator::EQ, |
|
| 1170 | 2 |
|
| 1171 | ), |
|
| 1172 | ] |
|
| 1173 | ) |
|
| 1174 | ) |
|
| 1175 | ); |
|
| 1176 | } |
|
| 1177 | ||
| 1178 | public function testUserMetadataFilterOwnerAdministrator() |
|
| 1179 | { |
|
| @@ 1198-1214 (lines=17) @@ | ||
| 1195 | ); |
|
| 1196 | } |
|
| 1197 | ||
| 1198 | public function testUserMetadataFilterOwnerEqAMember() |
|
| 1199 | { |
|
| 1200 | $this->assertSearchResults( |
|
| 1201 | [223], |
|
| 1202 | $this->getContentSearchHandler()->findContent( |
|
| 1203 | new Query( |
|
| 1204 | [ |
|
| 1205 | 'filter' => new Criterion\UserMetadata( |
|
| 1206 | Criterion\UserMetadata::OWNER, |
|
| 1207 | Criterion\Operator::EQ, |
|
| 1208 | 226 |
|
| 1209 | ), |
|
| 1210 | ] |
|
| 1211 | ) |
|
| 1212 | ) |
|
| 1213 | ); |
|
| 1214 | } |
|
| 1215 | ||
| 1216 | public function testUserMetadataFilterOwnerInAMember() |
|
| 1217 | { |
|
| @@ 1216-1232 (lines=17) @@ | ||
| 1213 | ); |
|
| 1214 | } |
|
| 1215 | ||
| 1216 | public function testUserMetadataFilterOwnerInAMember() |
|
| 1217 | { |
|
| 1218 | $this->assertSearchResults( |
|
| 1219 | [223], |
|
| 1220 | $this->getContentSearchHandler()->findContent( |
|
| 1221 | new Query( |
|
| 1222 | [ |
|
| 1223 | 'filter' => new Criterion\UserMetadata( |
|
| 1224 | Criterion\UserMetadata::OWNER, |
|
| 1225 | Criterion\Operator::IN, |
|
| 1226 | [226] |
|
| 1227 | ), |
|
| 1228 | ] |
|
| 1229 | ) |
|
| 1230 | ) |
|
| 1231 | ); |
|
| 1232 | } |
|
| 1233 | ||
| 1234 | public function testUserMetadataFilterCreatorEqAMember() |
|
| 1235 | { |
|
| @@ 1234-1250 (lines=17) @@ | ||
| 1231 | ); |
|
| 1232 | } |
|
| 1233 | ||
| 1234 | public function testUserMetadataFilterCreatorEqAMember() |
|
| 1235 | { |
|
| 1236 | $this->assertSearchResults( |
|
| 1237 | [223], |
|
| 1238 | $this->getContentSearchHandler()->findContent( |
|
| 1239 | new Query( |
|
| 1240 | [ |
|
| 1241 | 'filter' => new Criterion\UserMetadata( |
|
| 1242 | Criterion\UserMetadata::MODIFIER, |
|
| 1243 | Criterion\Operator::EQ, |
|
| 1244 | 226 |
|
| 1245 | ), |
|
| 1246 | ] |
|
| 1247 | ) |
|
| 1248 | ) |
|
| 1249 | ); |
|
| 1250 | } |
|
| 1251 | ||
| 1252 | public function testUserMetadataFilterCreatorInAMember() |
|
| 1253 | { |
|
| @@ 1252-1268 (lines=17) @@ | ||
| 1249 | ); |
|
| 1250 | } |
|
| 1251 | ||
| 1252 | public function testUserMetadataFilterCreatorInAMember() |
|
| 1253 | { |
|
| 1254 | $this->assertSearchResults( |
|
| 1255 | [223], |
|
| 1256 | $this->getContentSearchHandler()->findContent( |
|
| 1257 | new Query( |
|
| 1258 | [ |
|
| 1259 | 'filter' => new Criterion\UserMetadata( |
|
| 1260 | Criterion\UserMetadata::MODIFIER, |
|
| 1261 | Criterion\Operator::IN, |
|
| 1262 | [226] |
|
| 1263 | ), |
|
| 1264 | ] |
|
| 1265 | ) |
|
| 1266 | ) |
|
| 1267 | ); |
|
| 1268 | } |
|
| 1269 | ||
| 1270 | public function testUserMetadataFilterEqGroupMember() |
|
| 1271 | { |
|
| @@ 1270-1286 (lines=17) @@ | ||
| 1267 | ); |
|
| 1268 | } |
|
| 1269 | ||
| 1270 | public function testUserMetadataFilterEqGroupMember() |
|
| 1271 | { |
|
| 1272 | $this->assertSearchResults( |
|
| 1273 | [223], |
|
| 1274 | $this->getContentSearchHandler()->findContent( |
|
| 1275 | new Query( |
|
| 1276 | [ |
|
| 1277 | 'filter' => new Criterion\UserMetadata( |
|
| 1278 | Criterion\UserMetadata::GROUP, |
|
| 1279 | Criterion\Operator::EQ, |
|
| 1280 | 11 |
|
| 1281 | ), |
|
| 1282 | ] |
|
| 1283 | ) |
|
| 1284 | ) |
|
| 1285 | ); |
|
| 1286 | } |
|
| 1287 | ||
| 1288 | public function testUserMetadataFilterInGroupMember() |
|
| 1289 | { |
|
| @@ 1288-1304 (lines=17) @@ | ||
| 1285 | ); |
|
| 1286 | } |
|
| 1287 | ||
| 1288 | public function testUserMetadataFilterInGroupMember() |
|
| 1289 | { |
|
| 1290 | $this->assertSearchResults( |
|
| 1291 | [223], |
|
| 1292 | $this->getContentSearchHandler()->findContent( |
|
| 1293 | new Query( |
|
| 1294 | [ |
|
| 1295 | 'filter' => new Criterion\UserMetadata( |
|
| 1296 | Criterion\UserMetadata::GROUP, |
|
| 1297 | Criterion\Operator::IN, |
|
| 1298 | [11] |
|
| 1299 | ), |
|
| 1300 | ] |
|
| 1301 | ) |
|
| 1302 | ) |
|
| 1303 | ); |
|
| 1304 | } |
|
| 1305 | ||
| 1306 | public function testUserMetadataFilterEqGroupMemberNoMatch() |
|
| 1307 | { |
|
| @@ 1306-1322 (lines=17) @@ | ||
| 1303 | ); |
|
| 1304 | } |
|
| 1305 | ||
| 1306 | public function testUserMetadataFilterEqGroupMemberNoMatch() |
|
| 1307 | { |
|
| 1308 | $this->assertSearchResults( |
|
| 1309 | [], |
|
| 1310 | $this->getContentSearchHandler()->findContent( |
|
| 1311 | new Query( |
|
| 1312 | [ |
|
| 1313 | 'filter' => new Criterion\UserMetadata( |
|
| 1314 | Criterion\UserMetadata::GROUP, |
|
| 1315 | Criterion\Operator::EQ, |
|
| 1316 | 13 |
|
| 1317 | ), |
|
| 1318 | ] |
|
| 1319 | ) |
|
| 1320 | ) |
|
| 1321 | ); |
|
| 1322 | } |
|
| 1323 | ||
| 1324 | public function testUserMetadataFilterInGroupMemberNoMatch() |
|
| 1325 | { |
|
| @@ 1324-1340 (lines=17) @@ | ||
| 1321 | ); |
|
| 1322 | } |
|
| 1323 | ||
| 1324 | public function testUserMetadataFilterInGroupMemberNoMatch() |
|
| 1325 | { |
|
| 1326 | $this->assertSearchResults( |
|
| 1327 | [], |
|
| 1328 | $this->getContentSearchHandler()->findContent( |
|
| 1329 | new Query( |
|
| 1330 | [ |
|
| 1331 | 'filter' => new Criterion\UserMetadata( |
|
| 1332 | Criterion\UserMetadata::GROUP, |
|
| 1333 | Criterion\Operator::IN, |
|
| 1334 | [13] |
|
| 1335 | ), |
|
| 1336 | ] |
|
| 1337 | ) |
|
| 1338 | ) |
|
| 1339 | ); |
|
| 1340 | } |
|
| 1341 | ||
| 1342 | public function testFieldRelationFilterContainsSingle() |
|
| 1343 | { |
|
| @@ 1360-1376 (lines=17) @@ | ||
| 1357 | ); |
|
| 1358 | } |
|
| 1359 | ||
| 1360 | public function testFieldRelationFilterContainsSingleNoMatch() |
|
| 1361 | { |
|
| 1362 | $this->assertSearchResults( |
|
| 1363 | [], |
|
| 1364 | $this->getContentSearchHandler()->findContent( |
|
| 1365 | new Query( |
|
| 1366 | [ |
|
| 1367 | 'filter' => new Criterion\FieldRelation( |
|
| 1368 | 'billboard', |
|
| 1369 | Criterion\Operator::CONTAINS, |
|
| 1370 | [4] |
|
| 1371 | ), |
|
| 1372 | ] |
|
| 1373 | ) |
|
| 1374 | ) |
|
| 1375 | ); |
|
| 1376 | } |
|
| 1377 | ||
| 1378 | public function testFieldRelationFilterContainsArray() |
|
| 1379 | { |
|