public function testNoExceptionIfColumnIsFound()
{
$queryConfiguration = QueryConfigurationBuilder::create()->start(0)->length(2)->drawCall(1)->columnOrder('name', 'desc')->build();
$columnConfiguration = ColumnConfigurationBuilder::create()->name('foundColumn')->build();
/**
* Create a mocked query builder...
*/
$queryBuilder = $this->setupMockQueryBuilder();
$queryBuilder->shouldReceive('orderBy')->with('name', 'desc')->once();
$queryBuilder->shouldReceive('skip')->with(0);
$queryBuilder->shouldReceive('limit')->with(2);
$queryBuilder->shouldReceive('count')->withNoArgs();
$queryBuilder->shouldReceive('get')->withArgs([['name']]);
$provider = new QueryBuilderProvider($queryBuilder);
$provider->prepareForProcessing($queryConfiguration, [$columnConfiguration]);
$getColumnFromName = new \ReflectionMethod($provider, 'getColumnFromName');
$getColumnFromName->setAccessible(true);
//$provider->getColumnFromName('notFound');
$foundColumn = $getColumnFromName->invoke($provider, 'foundColumn');
$this->assertInstanceOf(ColumnConfiguration::class, $foundColumn);
$this->assertEquals($columnConfiguration, $foundColumn);
}