function it_applies_join_on_datasource_query(Datasource $datasource, DatagridConfiguration $configuration, QueryBuilder $queryBuilder)
 {
     $datasource->getQueryBuilder()->willReturn($queryBuilder);
     $queryBuilder->leftJoin('values.metric', 'metric')->willReturn($queryBuilder);
     $queryBuilder->addSelect('metric')->willReturn($queryBuilder);
     $this->apply($datasource, $configuration);
 }
 function it_applies_join_on_datasource_query(Datasource $datasource, DatagridConfiguration $configuration, QueryBuilder $queryBuilder)
 {
     $datasource->getQueryBuilder()->willReturn($queryBuilder);
     $queryBuilder->leftJoin('values.options', 'multioptions')->willReturn($queryBuilder);
     $queryBuilder->addSelect('multioptions')->willReturn($queryBuilder);
     $queryBuilder->leftJoin('multioptions.optionValues', 'multioptionvalues', 'WITH', 'multioptionvalues.locale = :dataLocale OR multioptionvalues.locale IS NULL')->willReturn($queryBuilder);
     $queryBuilder->addSelect('multioptionvalues')->willReturn($queryBuilder);
     $this->apply($datasource, $configuration);
 }
 function it_applies_join_on_datasource_query(Datasource $datasource, DatagridConfiguration $configuration, QueryBuilder $queryBuilder)
 {
     $datasource->getQueryBuilder()->willReturn($queryBuilder);
     $configuration->offsetGetByPath('[source][displayed_attribute_ids]')->willReturn([1, 2]);
     $queryBuilder->getRootAlias()->willReturn('p');
     $queryBuilder->leftJoin('p.values', 'values', 'WITH', sprintf('%s AND %s AND %s', 'values.attribute IN (:attributeIds)', '(values.locale = :dataLocale OR values.locale IS NULL)', '(values.scope = :scopeCode OR values.scope IS NULL)'))->willReturn($queryBuilder);
     $queryBuilder->addSelect('values')->willReturn($queryBuilder);
     $queryBuilder->leftJoin('values.attribute', 'attribute')->willReturn($queryBuilder);
     $queryBuilder->addSelect('attribute')->willReturn($queryBuilder);
     $queryBuilder->setParameter('attributeIds', [1, 2])->willReturn($queryBuilder);
     $this->apply($datasource, $configuration);
 }