/** * @test */ public function itShouldThrowExceptionIfDirectionNotValid() { $column = new Column('registration_date', 'user'); $order = new OrderBy($column, OrderBy::ASC); $this->setExpectedException('\\InvalidArgumentException'); $order->setDirection('this is not a valid direction'); }