public function testComment()
 {
     $query = ['$comment' => 'Bar'];
     $this->filter->comment('Foo');
     $this->filter->comment('Bar');
     $this->assertEquals($query, $this->filter->toArray());
 }
 /**
  * Add new `and`, `or` or `xor` sub query
  *
  * @param        $operator
  * @param Filter $condition
  *
  * @return $this
  */
 protected function addLogicExpr($operator, Filter $condition)
 {
     if (!isset($this->expressions[$operator])) {
         $this->expressions[$operator] = [];
     }
     $this->expressions[$operator][] = $condition->toArray();
     return $this;
 }