/**
  * @return array
  */
 protected function getExtensions()
 {
     $configProvider = $this->getMockBuilder('\\Oro\\Bundle\\ChartBundle\\Model\\ConfigProvider')->disableOriginalConstructor()->getMock();
     $configProvider->expects($this->atLeastOnce())->method('getChartConfigs')->will($this->returnValue([]));
     $mock = $this->getMockBuilder('Oro\\Bundle\\ChartBundle\\Form\\EventListener\\ChartTypeEventListener')->getMock();
     $eventListener = new MutableFormEventSubscriber($mock);
     $childType = new ChartType($configProvider);
     $childType->setEventListener($eventListener);
     $collectionType = new ChartSettingsCollectionType();
     $schemaCollectionType = new ReportChartSchemaCollectionType($configProvider);
     return [new PreloadedExtension([$childType->getName() => $childType, $collectionType->getName() => $collectionType, $schemaCollectionType->getName() => $schemaCollectionType], [])];
 }
Exemple #2
0
 /**
  * @return array
  */
 protected function getExtensions()
 {
     $childType = new ChartSettingsType($this->configProvider);
     $collectionType = new ChartSettingsCollectionType();
     return [new PreloadedExtension([$childType->getName() => $childType, $collectionType->getName() => $collectionType], [])];
 }