Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
deguif committed Nov 18, 2021
1 parent a7ca6f9 commit be0929e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,30 @@ public function testCollapseSecondLevelArrayStructure(): void
$this->assertEquals($expected, $actual['collapse']);
}

/**
* @group unit
*/
public function testIndicesBoostQuery(): void
{
$query = (new Query(new Term(['field' => 'value'])))
->setIndicesBoost(['foo' => 1.0, 'bar' => 2])
;

$expected = [
'query' => [
'term' => [
'field' => 'value',
],
],
'indices_boost' => [
['foo' => 1.0],
['bar' => 2],
],
];

$this->assertSame($expected, $query->toArray());
}

/**
* @group unit
*/
Expand Down

0 comments on commit be0929e

Please sign in to comment.