You are here

public function FeaturesManagerTest::testDetectNewWithNoNewConfig in Features 8.4

Same name and namespace in other branches
  1. 8.3 tests/src/Unit/FeaturesManagerTest.php \Drupal\Tests\features\Unit\FeaturesManagerTest::testDetectNewWithNoNewConfig()

File

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

Class

FeaturesManagerTest
@coversDefaultClass Drupal\features\FeaturesManager @group features

Namespace

Drupal\Tests\features\Unit

Code

public function testDetectNewWithNoNewConfig() {
  $package = new Package('test_feature', [
    'config' => [
      'test_config',
    ],
  ]);
  $extension_storage = $this
    ->prophesize(FeaturesExtensionStoragesInterface::class);
  $extension_storage
    ->read('test_config')
    ->willReturn([
    'key' => 'value',
  ]);
  $features_manager = new TestFeaturesManager($this->root, $this->entityTypeManager, $this->configFactory, $this->configStorage, $this->configManager, $this->moduleHandler, $this->configReverter, $this->moduleExtensionList);
  $features_manager
    ->setExtensionStorages($extension_storage
    ->reveal());
  $this
    ->assertEmpty($features_manager
    ->detectNew($package));
}