/**
  * @dataProvider queryBuilderDataProvider
  * @param string $type
  */
 public function testGetMarketingListQueryBuilder($type)
 {
     $marketingList = $this->getMarketingList($type);
     $queryBuilder = $this->getQueryBuilder();
     $dataGrid = $this->getMockBuilder('Oro\\Bundle\\DataGridBundle\\Datagrid\\DatagridInterface')->getMockForAbstractClass();
     $this->assertGetQueryBuilder($marketingList, $queryBuilder, $dataGrid);
     $this->assertEquals($queryBuilder, $this->provider->getMarketingListQueryBuilder($marketingList));
 }
 public function testGetMarketingListQueryBuilderBySegment()
 {
     $marketingList = $this->getMarketingList(MarketingListType::TYPE_DYNAMIC);
     $queryBuilder = $this->getMockBuilder('Doctrine\\ORM\\QueryBuilder')->disableOriginalConstructor()->getMock();
     $dataGrid = $this->getMockBuilder('Oro\\Bundle\\DataGridBundle\\Datagrid\\DatagridInterface')->getMockForAbstractClass();
     $this->assertGetQueryBuilder($marketingList, $queryBuilder, $dataGrid);
     $this->assertEquals($queryBuilder, $this->provider->getMarketingListQueryBuilder($marketingList));
 }
 /**
  * @dataProvider queryBuilderDataProvider
  * @param string $type
  */
 public function testGetMarketingListQueryBuilder($type)
 {
     $marketingList = $this->getMarketingList($type);
     $queryBuilder = $this->getQueryBuilder();
     $dataGrid = $this->getDataGrid();
     $this->assertGetQueryBuilder($marketingList, $queryBuilder, $dataGrid);
     $this->assertEquals($queryBuilder, $this->provider->getMarketingListQueryBuilder($marketingList));
     $expectedColumnInformation = ['testField' => 't0.test'];
     $this->assertEquals($expectedColumnInformation, $this->provider->getColumnInformation($marketingList));
 }