| @@ 32-38 (lines=7) @@ | ||
| 29 | /** |
|
| 30 | * @group unit |
|
| 31 | */ |
|
| 32 | public function testIncludeExactMatch(): void |
|
| 33 | { |
|
| 34 | $agg = new Terms('terms'); |
|
| 35 | $agg->setIncludeAsExactMatch(['first', 'second']); |
|
| 36 | ||
| 37 | $this->assertSame(['first', 'second'], $agg->getParam('include')); |
|
| 38 | } |
|
| 39 | ||
| 40 | /** |
|
| 41 | * @group unit |
|
| @@ 43-52 (lines=10) @@ | ||
| 40 | /** |
|
| 41 | * @group unit |
|
| 42 | */ |
|
| 43 | public function testIncludeWithPartitions(): void |
|
| 44 | { |
|
| 45 | $agg = new Terms('terms'); |
|
| 46 | $agg->setIncludeWithPartitions(1, 23); |
|
| 47 | ||
| 48 | $this->assertSame([ |
|
| 49 | 'partition' => 1, |
|
| 50 | 'num_partitions' => 23, |
|
| 51 | ], $agg->getParam('include')); |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * @group unit |
|
| @@ 68-74 (lines=7) @@ | ||
| 65 | /** |
|
| 66 | * @group unit |
|
| 67 | */ |
|
| 68 | public function testExcludeExactMatch(): void |
|
| 69 | { |
|
| 70 | $agg = new Terms('terms'); |
|
| 71 | $agg->setExcludeAsExactMatch(['first', 'second']); |
|
| 72 | ||
| 73 | $this->assertSame(['first', 'second'], $agg->getParam('exclude')); |
|
| 74 | } |
|
| 75 | ||
| 76 | public function testTermsAggregation(): void |
|
| 77 | { |
|