/**
  * Determines the parameters and calls WhereRaw
  *
  * @param array $arguments
  * @param array &$parts
  *
  * @return $this
  * @throws InvalidArgumentException
  */
 private function runWhereRawMethod(array $arguments, array &$parts)
 {
     if (count($arguments) !== 1) {
         throw new InvalidArgumentException("You must pass a raw query string to filter the results.");
     }
     $condition = $arguments[0];
     $logical = $parts[1];
     $this->filter = $this->filter->whereRaw($condition, $logical);
     return $this;
 }
 /**
  * @test
  * @expectedException InvalidArgumentException
  */
 public function it_raises_an_exception_when_building_where_raw_with_an_unknown_logical()
 {
     $this->filter->whereRaw("condition = value'", 'xor');
 }