| Total Complexity | 2 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class SearchQueryTest extends SapphireTest |
||
| 11 | { |
||
| 12 | |||
| 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 | } |
||
| 31 | |||
| 32 | public function testLimits() |
||
| 40 | } |
||
| 41 | } |