public function testToArrayWithNullValue()
 {
     $words = 'plutôt cela';
     $query = 'Batman';
     $hits = null;
     $suggestion = new SearchEngineSuggestion($query, $words, $hits);
     $this->assertEquals(['query' => $query, 'hits' => null, 'suggestion' => $words], $suggestion->toArray());
 }
 private static function suggestionsHitSorter(SearchEngineSuggestion $a, SearchEngineSuggestion $b)
 {
     if ($a->getHits() == $b->getHits()) {
         return 0;
     }
     return $a->getHits() > $b->getHits() ? -1 : 1;
 }