You are here

protected function FeaturesManagerTest::getAssignInterPackageDependenciesConfigCollection in Features 8.3

Same name and namespace in other branches
  1. 8.4 tests/src/Unit/FeaturesManagerTest.php \Drupal\Tests\features\Unit\FeaturesManagerTest::getAssignInterPackageDependenciesConfigCollection()
2 calls to FeaturesManagerTest::getAssignInterPackageDependenciesConfigCollection()
FeaturesManagerTest::testAssignInterPackageDependenciesWithBundle in tests/src/Unit/FeaturesManagerTest.php
@covers ::assignInterPackageDependencies
FeaturesManagerTest::testAssignInterPackageDependenciesWithoutBundle in tests/src/Unit/FeaturesManagerTest.php
@covers ::assignInterPackageDependencies

File

tests/src/Unit/FeaturesManagerTest.php, line 309

Class

FeaturesManagerTest
@coversDefaultClass Drupal\features\FeaturesManager @group features

Namespace

Drupal\Tests\features\Unit

Code

protected function getAssignInterPackageDependenciesConfigCollection() {
  $config_collection = [];
  $config_collection['example.config'] = (new ConfigurationItem('example.config', [
    'dependencies' => [
      'config' => [
        'example.config2',
        'example.config3',
        'example.config4',
        'example.config5',
        'example.config6',
        'example.config7',
      ],
    ],
  ]))
    ->setSubdirectory(InstallStorage::CONFIG_INSTALL_DIRECTORY)
    ->setPackage('package');
  $config_collection['example.config2'] = (new ConfigurationItem('example.config2', [
    'dependencies' => [],
  ]))
    ->setSubdirectory(InstallStorage::CONFIG_INSTALL_DIRECTORY)
    ->setPackage('package2')
    ->setProvider('my_feature');
  $config_collection['example.config3'] = (new ConfigurationItem('example.config3', [
    'dependencies' => [],
  ]))
    ->setSubdirectory(InstallStorage::CONFIG_INSTALL_DIRECTORY)
    ->setProvider('my_other_feature');
  $config_collection['example.config4'] = (new ConfigurationItem('example.config3', [
    'dependencies' => [],
  ]))
    ->setSubdirectory(InstallStorage::CONFIG_INSTALL_DIRECTORY)
    ->setProvider(static::PROFILE_NAME);
  $config_collection['example.config5'] = (new ConfigurationItem('example.config5', [
    'dependencies' => [],
  ]))
    ->setSubdirectory(InstallStorage::CONFIG_OPTIONAL_DIRECTORY)
    ->setPackage('package3');
  $config_collection['example.config6'] = (new ConfigurationItem('example.config6', [
    'dependencies' => [],
  ]))
    ->setSubdirectory(InstallStorage::CONFIG_INSTALL_DIRECTORY)
    ->setProvider('my_uninstalled_feature');
  $config_collection['example.config7'] = (new ConfigurationItem('example.config7', [
    'dependencies' => [],
  ]))
    ->setSubdirectory(InstallStorage::CONFIG_INSTALL_DIRECTORY)
    ->setProvider('package4');
  return $config_collection;
}