Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function testAddSearchTerm() |
||
14 | { |
||
15 | $query = new SearchQuery(); |
||
16 | $query = $query->addSearchTerm('Test term', [], 2); |
||
17 | |||
18 | $expected = [ |
||
19 | [ |
||
20 | 'text' => 'Test term', |
||
21 | 'fields' => |
||
22 | [ |
||
23 | ], |
||
24 | 'boost' => 2, |
||
25 | 'fuzzy' => null, |
||
26 | ] |
||
27 | ]; |
||
28 | |||
29 | $this->assertEquals($expected, $query->getTerms()); |
||
30 | } |
||
41 | } |