| @@ 524-539 (lines=16) @@ | ||
| 521 | ); |
|
| 522 | } |
|
| 523 | ||
| 524 | public function testContentSubtreeFilterIn() |
|
| 525 | { |
|
| 526 | $this->assertSearchResults( |
|
| 527 | [67, 68, 69, 70, 71, 72, 73, 74], |
|
| 528 | $this->getContentSearchHandler()->findContent( |
|
| 529 | new Query( |
|
| 530 | [ |
|
| 531 | 'filter' => new Criterion\Subtree( |
|
| 532 | ['/1/2/69/'] |
|
| 533 | ), |
|
| 534 | 'limit' => 10, |
|
| 535 | ] |
|
| 536 | ) |
|
| 537 | ) |
|
| 538 | ); |
|
| 539 | } |
|
| 540 | ||
| 541 | public function testContentSubtreeFilterEq() |
|
| 542 | { |
|
| @@ 541-554 (lines=14) @@ | ||
| 538 | ); |
|
| 539 | } |
|
| 540 | ||
| 541 | public function testContentSubtreeFilterEq() |
|
| 542 | { |
|
| 543 | $this->assertSearchResults( |
|
| 544 | [67, 68, 69, 70, 71, 72, 73, 74], |
|
| 545 | $this->getContentSearchHandler()->findContent( |
|
| 546 | new Query( |
|
| 547 | [ |
|
| 548 | 'filter' => new Criterion\Subtree('/1/2/69/'), |
|
| 549 | 'limit' => 10, |
|
| 550 | ] |
|
| 551 | ) |
|
| 552 | ) |
|
| 553 | ); |
|
| 554 | } |
|
| 555 | ||
| 556 | public function testContentTypeIdFilter() |
|
| 557 | { |
|
| @@ 587-600 (lines=14) @@ | ||
| 584 | ); |
|
| 585 | } |
|
| 586 | ||
| 587 | public function testContentTypeGroupFilter() |
|
| 588 | { |
|
| 589 | $this->assertSearchResults( |
|
| 590 | [4, 10, 11, 12, 13, 14, 42, 225, 226], |
|
| 591 | $this->getContentSearchHandler()->findContent( |
|
| 592 | new Query( |
|
| 593 | [ |
|
| 594 | 'filter' => new Criterion\ContentTypeGroupId(2), |
|
| 595 | 'limit' => 10, |
|
| 596 | ] |
|
| 597 | ) |
|
| 598 | ) |
|
| 599 | ); |
|
| 600 | } |
|
| 601 | ||
| 602 | public function testDateMetadataFilterModifiedGreater() |
|
| 603 | { |
|
| @@ 761-774 (lines=14) @@ | ||
| 758 | ); |
|
| 759 | } |
|
| 760 | ||
| 761 | public function testSectionFilter() |
|
| 762 | { |
|
| 763 | $this->assertSearchResults( |
|
| 764 | [4, 10, 11, 12, 13, 14, 42, 226], |
|
| 765 | $this->getContentSearchHandler()->findContent( |
|
| 766 | new Query( |
|
| 767 | [ |
|
| 768 | 'filter' => new Criterion\SectionId([2]), |
|
| 769 | 'limit' => 10, |
|
| 770 | ] |
|
| 771 | ) |
|
| 772 | ) |
|
| 773 | ); |
|
| 774 | } |
|
| 775 | ||
| 776 | public function testStatusFilter() |
|
| 777 | { |
|
| @@ 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 | { |
|