protected function setUp()
 {
     $this->functionProvider = $this->getMock('Oro\\Bundle\\QueryDesignerBundle\\QueryDesigner\\FunctionProviderInterface');
     $this->virtualFieldProvider = $this->getMock('Oro\\Bundle\\EntityBundle\\Provider\\VirtualFieldProviderInterface');
     $this->doctrine = $this->getMockBuilder('Symfony\\Bridge\\Doctrine\\ManagerRegistry')->disableOriginalConstructor()->getMock();
     $this->configManager = $this->getMockBuilder('Oro\\Bundle\\EntityConfigBundle\\Config\\ConfigManager')->disableOriginalConstructor()->getMock();
     $builder = new ReportDatagridConfigurationBuilder($this->functionProvider, $this->virtualFieldProvider, $this->doctrine, new DatagridGuesserMock());
     $builder->setConfigManager($this->configManager);
     $this->target = new ReportDatagridConfigurationProvider($builder, $this->doctrine);
 }
 /**
  * {@inheritdoc}
  */
 public function getConfiguration($gridName)
 {
     if ($this->configuration === null) {
         $id = intval(substr($gridName, strlen(Report::GRID_PREFIX)));
         $repo = $this->doctrine->getRepository('OroReportBundle:Report');
         $report = $repo->find($id);
         $this->builder->setGridName($gridName);
         $this->builder->setSource($report);
         $this->configuration = $this->builder->getConfiguration();
     }
     return $this->configuration;
 }