Skip to content

Commit

Permalink
Fix querytest
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed May 29, 2024
1 parent 32dc290 commit faea1b5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/Search/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ public static function provideQueryWithOptions(): iterable
];

yield 'with_single_tag' => [
new Query('monolog', ['testing'], '', 15, 1),
['hitsPerPage' => 15, 'page' => 0, 'filters' => '(tags:"testing")'],
new Query('monolog', ['testing"quote'], '', 15, 1),
['hitsPerPage' => 15, 'page' => 0, 'filters' => '(tags:"testing\"quote")'],
];

yield 'with_single_tag_but_space' => [
Expand All @@ -170,18 +170,18 @@ public static function provideQueryWithOptions(): iterable
];

yield 'with_type' => [
new Query('monolog', [], 'symfony-bundle', 15, 1),
['hitsPerPage' => 15, 'page' => 0, 'filters' => 'type:symfony-bundle'],
new Query('monolog', [], 'symfony-bundle"quote', 15, 1),
['hitsPerPage' => 15, 'page' => 0, 'filters' => 'type:"symfony-bundle\"quote"'],
];

yield 'with_single_tag_and_type' => [
new Query('monolog', ['testing'], 'symfony-bundle', 15, 1),
['hitsPerPage' => 15, 'page' => 0, 'filters' => 'type:symfony-bundle AND (tags:"testing")'],
['hitsPerPage' => 15, 'page' => 0, 'filters' => 'type:"symfony-bundle" AND (tags:"testing")'],
];

yield 'with_multiple_tags_and_type' => [
new Query('monolog', ['testing', 'mock'], 'symfony-bundle', 15, 1),
['hitsPerPage' => 15, 'page' => 0, 'filters' => 'type:symfony-bundle AND (tags:"testing" OR tags:"mock")'],
['hitsPerPage' => 15, 'page' => 0, 'filters' => 'type:"symfony-bundle" AND (tags:"testing" OR tags:"mock")'],
];
}
}

0 comments on commit faea1b5

Please sign in to comment.