Skip to content

Commit

Permalink
Adapt test
Browse files Browse the repository at this point in the history
  • Loading branch information
deguif committed Mar 24, 2021
1 parent 39436c2 commit 5fcc3a3
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,15 +392,27 @@ public function testSetPostFilterToArrayCast(): void
/**
* @group unit
*/
public function testSetPostFilterWithArray(): void
public function testRawPostFilter(): void
{
$query = (new Query())
->setQuery(new Term(['field' => 'value']))
->setParam('post_filter', [
'term' => ['field' => 'value'],
])
;

$query->toArray();
$this->assertSame([
'query' => [
'term' => [
'field' => 'value',
],
],
'post_filter' => [
'term' => [
'field' => 'value',
],
],
], $query->toArray());
}

/**
Expand Down

0 comments on commit 5fcc3a3

Please sign in to comment.