/** * @expectedException RuntimeException */ public function testPrepareSortWhereColumnDoesntExist() { $handler = new Handler($dataGrid = $this->getMockDataGrid()); $dataGrid->getEnvironment()->getRequestProvider()->shouldReceive('getSort')->once()->andReturn('invalid'); $handler->prepareSort(); }