/**
  * Determines the parameters and calls OrderBy with a property in the method name
  *
  * @param array &$parts
  *
  * @return $this
  */
 private function runOrderByWithPropertyMethod(array &$parts)
 {
     $parts = array_pad($parts, 4, null);
     // Trim any Asc or Desc off of the end
     $column = preg_replace("/^(.*)(?:Asc|Desc)\$/u", "\$1", $parts[2]);
     $order = $parts[3];
     $continue = $parts[1];
     $this->filter = $this->filter->orderBy($column, $order, $continue);
     return $this;
 }
 /**
  * @test
  * @expectedException InvalidArgumentException
  */
 public function it_raises_an_exception_when_building_order_by_with_an_unknown_logical()
 {
     $this->filter->orderBy('column', 'value', 'xor');
 }