| @@ 611-626 (lines=16) @@ | ||
| 608 | ); |
|
| 609 | } |
|
| 610 | ||
| 611 | public function testContentSubtreeFilterIn() |
|
| 612 | { |
|
| 613 | $this->assertSearchResults( |
|
| 614 | array(67, 68, 69, 70, 71, 72, 73, 74), |
|
| 615 | $this->getContentSearchHandler()->findContent( |
|
| 616 | new Query( |
|
| 617 | array( |
|
| 618 | 'filter' => new Criterion\Subtree( |
|
| 619 | array('/1/2/69/') |
|
| 620 | ), |
|
| 621 | 'limit' => 10, |
|
| 622 | ) |
|
| 623 | ) |
|
| 624 | ) |
|
| 625 | ); |
|
| 626 | } |
|
| 627 | ||
| 628 | public function testContentSubtreeFilterEq() |
|
| 629 | { |
|
| @@ 628-641 (lines=14) @@ | ||
| 625 | ); |
|
| 626 | } |
|
| 627 | ||
| 628 | public function testContentSubtreeFilterEq() |
|
| 629 | { |
|
| 630 | $this->assertSearchResults( |
|
| 631 | array(67, 68, 69, 70, 71, 72, 73, 74), |
|
| 632 | $this->getContentSearchHandler()->findContent( |
|
| 633 | new Query( |
|
| 634 | array( |
|
| 635 | 'filter' => new Criterion\Subtree('/1/2/69/'), |
|
| 636 | 'limit' => 10, |
|
| 637 | ) |
|
| 638 | ) |
|
| 639 | ) |
|
| 640 | ); |
|
| 641 | } |
|
| 642 | ||
| 643 | public function testContentTypeIdFilter() |
|
| 644 | { |
|
| @@ 674-687 (lines=14) @@ | ||
| 671 | ); |
|
| 672 | } |
|
| 673 | ||
| 674 | public function testContentTypeGroupFilter() |
|
| 675 | { |
|
| 676 | $this->assertSearchResults( |
|
| 677 | array(4, 10, 11, 12, 13, 14, 42, 225, 226), |
|
| 678 | $this->getContentSearchHandler()->findContent( |
|
| 679 | new Query( |
|
| 680 | array( |
|
| 681 | 'filter' => new Criterion\ContentTypeGroupId(2), |
|
| 682 | 'limit' => 10, |
|
| 683 | ) |
|
| 684 | ) |
|
| 685 | ) |
|
| 686 | ); |
|
| 687 | } |
|
| 688 | ||
| 689 | public function testDateMetadataFilterModifiedGreater() |
|
| 690 | { |
|
| @@ 848-861 (lines=14) @@ | ||
| 845 | ); |
|
| 846 | } |
|
| 847 | ||
| 848 | public function testSectionFilter() |
|
| 849 | { |
|
| 850 | $this->assertSearchResults( |
|
| 851 | array(4, 10, 11, 12, 13, 14, 42, 226), |
|
| 852 | $this->getContentSearchHandler()->findContent( |
|
| 853 | new Query( |
|
| 854 | array( |
|
| 855 | 'filter' => new Criterion\SectionId(array(2)), |
|
| 856 | 'limit' => 10, |
|
| 857 | ) |
|
| 858 | ) |
|
| 859 | ) |
|
| 860 | ); |
|
| 861 | } |
|
| 862 | ||
| 863 | public function testStatusFilter() |
|
| 864 | { |
|
| @@ 691-704 (lines=14) @@ | ||
| 688 | ); |
|
| 689 | } |
|
| 690 | ||
| 691 | public function testContentTypeGroupFilter() |
|
| 692 | { |
|
| 693 | $this->assertSearchResults( |
|
| 694 | array(5, 12, 13, 14, 15, 44, 45, 227, 228), |
|
| 695 | $this->getContentSearchHandler()->findLocations( |
|
| 696 | new LocationQuery( |
|
| 697 | array( |
|
| 698 | 'filter' => new Criterion\ContentTypeGroupId(2), |
|
| 699 | 'limit' => 10, |
|
| 700 | ) |
|
| 701 | ) |
|
| 702 | ) |
|
| 703 | ); |
|
| 704 | } |
|
| 705 | ||
| 706 | public function testContentTypeIdFilter() |
|
| 707 | { |
|
| @@ 786-799 (lines=14) @@ | ||
| 783 | ); |
|
| 784 | } |
|
| 785 | ||
| 786 | public function testSectionFilter() |
|
| 787 | { |
|
| 788 | $this->assertSearchResults( |
|
| 789 | array(5, 12, 13, 14, 15, 44, 45, 228), |
|
| 790 | $this->getContentSearchHandler()->findLocations( |
|
| 791 | new LocationQuery( |
|
| 792 | array( |
|
| 793 | 'filter' => new Criterion\SectionId(array(2)), |
|
| 794 | 'limit' => 10, |
|
| 795 | ) |
|
| 796 | ) |
|
| 797 | ) |
|
| 798 | ); |
|
| 799 | } |
|
| 800 | ||
| 801 | public function testDateMetadataFilterModifiedGreater() |
|
| 802 | { |
|