| @@ 390-412 (lines=23) @@ | ||
| 387 | ); |
|
| 388 | } |
|
| 389 | ||
| 390 | public function testLocationIdAndCombinatorFilter() |
|
| 391 | { |
|
| 392 | $this->assertSearchResults( |
|
| 393 | array(13), |
|
| 394 | $this->getContentSearchHandler()->findLocations( |
|
| 395 | new LocationQuery( |
|
| 396 | array( |
|
| 397 | 'filter' => new Criterion\LogicalAnd( |
|
| 398 | array( |
|
| 399 | new Criterion\LocationId( |
|
| 400 | array(4, 12, 13) |
|
| 401 | ), |
|
| 402 | new Criterion\LocationId( |
|
| 403 | array(13, 44) |
|
| 404 | ), |
|
| 405 | ) |
|
| 406 | ), |
|
| 407 | 'limit' => 10, |
|
| 408 | ) |
|
| 409 | ) |
|
| 410 | ) |
|
| 411 | ); |
|
| 412 | } |
|
| 413 | ||
| 414 | public function testLocationIdParentLocationIdAndCombinatorFilter() |
|
| 415 | { |
|
| @@ 577-593 (lines=17) @@ | ||
| 574 | ); |
|
| 575 | } |
|
| 576 | ||
| 577 | public function testVisibilityFilterVisible() |
|
| 578 | { |
|
| 579 | $this->assertSearchResults( |
|
| 580 | array(2, 5, 12, 13, 14), |
|
| 581 | $this->getContentSearchHandler()->findLocations( |
|
| 582 | new LocationQuery( |
|
| 583 | array( |
|
| 584 | 'filter' => new Criterion\Visibility( |
|
| 585 | Criterion\Visibility::VISIBLE |
|
| 586 | ), |
|
| 587 | 'limit' => 5, |
|
| 588 | 'sortClauses' => array(new SortClause\Location\Id()), |
|
| 589 | ) |
|
| 590 | ) |
|
| 591 | ) |
|
| 592 | ); |
|
| 593 | } |
|
| 594 | ||
| 595 | public function testVisibilityFilterHidden() |
|
| 596 | { |
|
| @@ 721-735 (lines=15) @@ | ||
| 718 | ); |
|
| 719 | } |
|
| 720 | ||
| 721 | public function testContentTypeIdentifierFilter() |
|
| 722 | { |
|
| 723 | $this->assertSearchResults( |
|
| 724 | array(43, 48, 51, 52, 53), |
|
| 725 | $this->getContentSearchHandler()->findLocations( |
|
| 726 | new LocationQuery( |
|
| 727 | array( |
|
| 728 | 'filter' => new Criterion\ContentTypeIdentifier('folder'), |
|
| 729 | 'limit' => 5, |
|
| 730 | 'sortClauses' => array(new SortClause\Location\Id()), |
|
| 731 | ) |
|
| 732 | ) |
|
| 733 | ) |
|
| 734 | ); |
|
| 735 | } |
|
| 736 | ||
| 737 | public function testObjectStateIdFilter() |
|
| 738 | { |
|
| @@ 839-856 (lines=18) @@ | ||
| 836 | ); |
|
| 837 | } |
|
| 838 | ||
| 839 | public function testDateMetadataFilterModifiedIn() |
|
| 840 | { |
|
| 841 | $this->assertSearchResults( |
|
| 842 | array(12, 15, 227, 228), |
|
| 843 | $this->getContentSearchHandler()->findLocations( |
|
| 844 | new LocationQuery( |
|
| 845 | array( |
|
| 846 | 'filter' => new Criterion\DateMetadata( |
|
| 847 | Criterion\DateMetadata::MODIFIED, |
|
| 848 | Criterion\Operator::IN, |
|
| 849 | array(1311154214, 1311154215) |
|
| 850 | ), |
|
| 851 | 'limit' => 10, |
|
| 852 | ) |
|
| 853 | ) |
|
| 854 | ) |
|
| 855 | ); |
|
| 856 | } |
|
| 857 | ||
| 858 | public function testDateMetadataFilterModifiedBetween() |
|
| 859 | { |
|
| @@ 858-875 (lines=18) @@ | ||
| 855 | ); |
|
| 856 | } |
|
| 857 | ||
| 858 | public function testDateMetadataFilterModifiedBetween() |
|
| 859 | { |
|
| 860 | $this->assertSearchResults( |
|
| 861 | array(12, 15, 227, 228), |
|
| 862 | $this->getContentSearchHandler()->findLocations( |
|
| 863 | new LocationQuery( |
|
| 864 | array( |
|
| 865 | 'filter' => new Criterion\DateMetadata( |
|
| 866 | Criterion\DateMetadata::MODIFIED, |
|
| 867 | Criterion\Operator::BETWEEN, |
|
| 868 | array(1311154213, 1311154215) |
|
| 869 | ), |
|
| 870 | 'limit' => 10, |
|
| 871 | ) |
|
| 872 | ) |
|
| 873 | ) |
|
| 874 | ); |
|
| 875 | } |
|
| 876 | ||
| 877 | public function testDateMetadataFilterCreatedBetween() |
|
| 878 | { |
|
| @@ 877-894 (lines=18) @@ | ||
| 874 | ); |
|
| 875 | } |
|
| 876 | ||
| 877 | public function testDateMetadataFilterCreatedBetween() |
|
| 878 | { |
|
| 879 | $this->assertSearchResults( |
|
| 880 | array(68, 133, 227), |
|
| 881 | $this->getContentSearchHandler()->findLocations( |
|
| 882 | new LocationQuery( |
|
| 883 | array( |
|
| 884 | 'filter' => new Criterion\DateMetadata( |
|
| 885 | Criterion\DateMetadata::CREATED, |
|
| 886 | Criterion\Operator::BETWEEN, |
|
| 887 | array(1299780749, 1311154215) |
|
| 888 | ), |
|
| 889 | 'limit' => 10, |
|
| 890 | ) |
|
| 891 | ) |
|
| 892 | ) |
|
| 893 | ); |
|
| 894 | } |
|
| 895 | ||
| 896 | public function testUserMetadataFilterOwnerWrongUserId() |
|
| 897 | { |
|