protected function setUp()
 {
     $this->doctrine = $this->getDoctrine([self::TEST_ENTITY => []], [self::TEST_ENTITY => [self::TEST_IDENTIFIER_NAME]]);
     $this->configManager = $this->getMockBuilder('Oro\\Bundle\\EntityConfigBundle\\Config\\ConfigManager')->disableOriginalConstructor()->getMock();
     $builder = new SegmentDatagridConfigurationBuilder($this->getFunctionProvider(), $this->getVirtualFieldProvider(), $this->doctrine, new DatagridGuesserMock());
     $builder->setConfigManager($this->configManager);
     $this->provider = new ConfigurationProvider($builder, $this->doctrine);
 }
 /**
  * Test grid definition when no route exists for entity in config
  * no grid actions should be added
  */
 public function testNoRouteConfiguration()
 {
     $segment = $this->getSegment();
     $doctrine = $this->getDoctrine([self::TEST_ENTITY => ['userName' => 'string']], [self::TEST_ENTITY => [self::TEST_IDENTIFIER_NAME]]);
     $configManager = $this->getMockBuilder('Oro\\Bundle\\EntityConfigBundle\\Config\\ConfigManager')->disableOriginalConstructor()->getMock();
     $builder = new SegmentDatagridConfigurationBuilder($this->getFunctionProvider(), $this->getVirtualFieldProvider(), $doctrine, new DatagridGuesserMock());
     $builder->setConfigManager($configManager);
     $builder->setGridName(self::TEST_GRID_NAME);
     $builder->setSource($segment);
     $result = $builder->getConfiguration()->toArray();
     $expected = $this->getExpectedDefinition();
     $this->assertEquals($expected, $result);
 }