| @@ 611-624 (lines=14) @@ | ||
| 608 | ); |
|
| 609 | } |
|
| 610 | ||
| 611 | public function testContentTypeGroupFilter() |
|
| 612 | { |
|
| 613 | $this->assertSearchResults( |
|
| 614 | [5, 12, 13, 14, 15, 44, 45, 227, 228], |
|
| 615 | $this->getContentSearchHandler()->findLocations( |
|
| 616 | new LocationQuery( |
|
| 617 | [ |
|
| 618 | 'filter' => new Criterion\ContentTypeGroupId(2), |
|
| 619 | 'limit' => 10, |
|
| 620 | ] |
|
| 621 | ) |
|
| 622 | ) |
|
| 623 | ); |
|
| 624 | } |
|
| 625 | ||
| 626 | public function testContentTypeIdFilter() |
|
| 627 | { |
|
| @@ 706-719 (lines=14) @@ | ||
| 703 | ); |
|
| 704 | } |
|
| 705 | ||
| 706 | public function testSectionFilter() |
|
| 707 | { |
|
| 708 | $this->assertSearchResults( |
|
| 709 | [5, 12, 13, 14, 15, 44, 45, 228], |
|
| 710 | $this->getContentSearchHandler()->findLocations( |
|
| 711 | new LocationQuery( |
|
| 712 | [ |
|
| 713 | 'filter' => new Criterion\SectionId([2]), |
|
| 714 | 'limit' => 10, |
|
| 715 | ] |
|
| 716 | ) |
|
| 717 | ) |
|
| 718 | ); |
|
| 719 | } |
|
| 720 | ||
| 721 | public function testDateMetadataFilterModifiedGreater() |
|
| 722 | { |
|
| @@ 530-545 (lines=16) @@ | ||
| 527 | ); |
|
| 528 | } |
|
| 529 | ||
| 530 | public function testContentSubtreeFilterIn() |
|
| 531 | { |
|
| 532 | $this->assertSearchResults( |
|
| 533 | [67, 68, 69, 70, 71, 72, 73, 74], |
|
| 534 | $this->getContentSearchHandler()->findContent( |
|
| 535 | new Query( |
|
| 536 | [ |
|
| 537 | 'filter' => new Criterion\Subtree( |
|
| 538 | ['/1/2/69/'] |
|
| 539 | ), |
|
| 540 | 'limit' => 10, |
|
| 541 | ] |
|
| 542 | ) |
|
| 543 | ) |
|
| 544 | ); |
|
| 545 | } |
|
| 546 | ||
| 547 | public function testContentSubtreeFilterEq() |
|
| 548 | { |
|
| @@ 547-560 (lines=14) @@ | ||
| 544 | ); |
|
| 545 | } |
|
| 546 | ||
| 547 | public function testContentSubtreeFilterEq() |
|
| 548 | { |
|
| 549 | $this->assertSearchResults( |
|
| 550 | [67, 68, 69, 70, 71, 72, 73, 74], |
|
| 551 | $this->getContentSearchHandler()->findContent( |
|
| 552 | new Query( |
|
| 553 | [ |
|
| 554 | 'filter' => new Criterion\Subtree('/1/2/69/'), |
|
| 555 | 'limit' => 10, |
|
| 556 | ] |
|
| 557 | ) |
|
| 558 | ) |
|
| 559 | ); |
|
| 560 | } |
|
| 561 | ||
| 562 | public function testContentTypeIdFilter() |
|
| 563 | { |
|
| @@ 593-606 (lines=14) @@ | ||
| 590 | ); |
|
| 591 | } |
|
| 592 | ||
| 593 | public function testContentTypeGroupFilter() |
|
| 594 | { |
|
| 595 | $this->assertSearchResults( |
|
| 596 | [4, 10, 11, 12, 13, 14, 42, 225, 226], |
|
| 597 | $this->getContentSearchHandler()->findContent( |
|
| 598 | new Query( |
|
| 599 | [ |
|
| 600 | 'filter' => new Criterion\ContentTypeGroupId(2), |
|
| 601 | 'limit' => 10, |
|
| 602 | ] |
|
| 603 | ) |
|
| 604 | ) |
|
| 605 | ); |
|
| 606 | } |
|
| 607 | ||
| 608 | public function testDateMetadataFilterModifiedGreater() |
|
| 609 | { |
|
| @@ 767-780 (lines=14) @@ | ||
| 764 | ); |
|
| 765 | } |
|
| 766 | ||
| 767 | public function testSectionFilter() |
|
| 768 | { |
|
| 769 | $this->assertSearchResults( |
|
| 770 | [4, 10, 11, 12, 13, 14, 42, 226], |
|
| 771 | $this->getContentSearchHandler()->findContent( |
|
| 772 | new Query( |
|
| 773 | [ |
|
| 774 | 'filter' => new Criterion\SectionId([2]), |
|
| 775 | 'limit' => 10, |
|
| 776 | ] |
|
| 777 | ) |
|
| 778 | ) |
|
| 779 | ); |
|
| 780 | } |
|
| 781 | ||
| 782 | public function testStatusFilter() |
|
| 783 | { |
|