Skip to content

Commit

Permalink
Change license
Browse files Browse the repository at this point in the history
Automatic commit for getparthenon/monorepo@4b5a143
  • Loading branch information
that-guy-iain committed Mar 21, 2024
1 parent 14a9bc1 commit 0b70d00
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions src/Common/Elasticsearch/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ public function build(): array
$query = current($this->queries);

return $this->addAggregation([
'query' => [
$query['queryType'] => [
$query['fieldName'] => $query['fieldValue'],
],
],
'query' => [
$query['queryType'] => [
$query['fieldName'] => $query['fieldValue'],
],
],
]);
}

Expand Down Expand Up @@ -134,10 +134,10 @@ public function build(): array
$output['bool'][$qualifierType] = [];
}
$output['bool'][$qualifierType][] = [
$query['queryType'] => [
$query['fieldName'] => $query['fieldValue'],
],
];
$query['queryType'] => [
$query['fieldName'] => $query['fieldValue'],
],
];
}
}

Expand Down
22 changes: 11 additions & 11 deletions tests/Parthenon/Common/Elasticsearch/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@ public function testDealsWithTwoQueries()
->query('match', 'secondField', 'secondValue')
->build();
$this->assertEquals([
'query' => [
'bool' => [
'must' => [
[
'match' => ['fieldName' => 'fieldValue'],
],
[
'match' => ['secondField' => 'secondValue'],
'query' => [
'bool' => [
'must' => [
[
'match' => ['fieldName' => 'fieldValue'],
],
[
'match' => ['secondField' => 'secondValue'],
],
],
],
],
],
],
], $output);
], $output);
}

public function testDealsWithTwoQueriesAndTwoNotQueries()
Expand Down
4 changes: 2 additions & 2 deletions tests/Parthenon/Export/Exporter/CsvExporterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public function testExportBasicArray()
',value_four,value_three'.PHP_EOL;

$rows = [
['column_one' => 'value', 'column_two' => 'value_two'],
['column_three' => 'value_three', 'column_two' => 'value_four'],
['column_one' => 'value', 'column_two' => 'value_two'],
['column_three' => 'value_three', 'column_two' => 'value_four'],
];

$this->assertEquals($expected, $exporter->getOutput($rows));
Expand Down

0 comments on commit 0b70d00

Please sign in to comment.