public function FeaturesManagerTest::testGetExportInfoWithBundle in Features 8.3
Same name and namespace in other branches
- 8.4 tests/src/Unit/FeaturesManagerTest.php \Drupal\Tests\features\Unit\FeaturesManagerTest::testGetExportInfoWithBundle()
@covers ::getExportInfo
File
- tests/src/ Unit/ FeaturesManagerTest.php, line 968 
Class
- FeaturesManagerTest
- @coversDefaultClass Drupal\features\FeaturesManager @group features
Namespace
Drupal\Tests\features\UnitCode
public function testGetExportInfoWithBundle() {
  $config_factory = $this
    ->getConfigFactoryStub([
    'features.settings' => [
      'export' => [
        'folder' => 'custom',
      ],
    ],
  ]);
  $this->featuresManager = new FeaturesManager($this->root, $this->entityTypeManager, $config_factory, $this->configStorage, $this->configManager, $this->moduleHandler, $this->configReverter, $this->moduleExtensionList);
  $package = new Package('test_feature');
  $bundle = new FeaturesBundle([
    'machine_name' => 'test_bundle',
  ], 'features_bundle');
  $result = $this->featuresManager
    ->getExportInfo($package, $bundle);
  $this
    ->assertEquals([
    'test_bundle_test_feature',
    'modules/custom',
  ], $result);
}