/**
  * @param string $name
  * @param string $primaryFieldName
  * @param string $requestFieldName
  * @param DataProvider\DataLoader $dataLoader
  * @param DataProvider\MetadataLoader $metadataLoader
  * @param CollectionFactory $configCollectionFactory
  * @param array $meta
  * @param array $data
  */
 public function __construct($name, $primaryFieldName, $requestFieldName, DataProvider\DataLoader $dataLoader, DataProvider\MetadataLoader $metadataLoader, CollectionFactory $configCollectionFactory, array $meta = [], array $data = [])
 {
     parent::__construct($name, $primaryFieldName, $requestFieldName, $meta, $data);
     $this->dataLoader = $dataLoader;
     $this->metadataLoader = $metadataLoader;
     $this->collection = $configCollectionFactory->create();
     $this->meta = array_merge($this->meta, $this->metadataLoader->getData());
 }
 /**
  * @param string $scope
  * @param string $scopeId
  * @param string $showFallbackReset
  * @dataProvider dataProviderGetData
  */
 public function testGetData($scope, $scopeId, $showFallbackReset)
 {
     $this->request->expects($this->exactly(2))->method('getParam')->willReturnMap([['scope', null, $scope], ['scope_id', null, $scopeId]]);
     $this->scopeFallbackResolver->expects($this->atLeastOnce())->method('getFallbackScope')->with($scope, $scopeId)->willReturn([$scope, $scopeId]);
     $this->storeManager->expects($this->once())->method('isSingleStoreMode')->willReturn(false);
     $this->designConfigRepository->expects($this->once())->method('getByScope')->with($scope, $scopeId)->willReturn($this->designConfig);
     $this->designConfig->expects($this->once())->method('getExtensionAttributes')->willReturn($this->designConfigExtension);
     $this->designConfigExtension->expects($this->once())->method('getDesignConfigData')->willReturn([$this->designConfigData]);
     $this->designConfigData->expects($this->atLeastOnce())->method('getFieldConfig')->willReturn(['field' => 'field', 'fieldset' => 'fieldset1']);
     $this->designConfigData->expects($this->once())->method('getValue')->willReturn('value');
     $result = $this->model->getData();
     $expected = ['fieldset1' => ['children' => ['field' => ['arguments' => ['data' => ['config' => ['default' => 'value', 'showFallbackReset' => $showFallbackReset]]]]]]];
     $this->assertEquals($expected, $result);
 }