You are here

protected function FeaturesAssignTest::addConfigurationItem in Features 8.3

Same name and namespace in other branches
  1. 8.4 tests/src/Kernel/FeaturesAssignTest.php \Drupal\Tests\features\Kernel\FeaturesAssignTest::addConfigurationItem()

Adds a configuration item.

Parameters

string $name: The config name.

array $data: The config data.

array $properties: (optional) Additional properties set on the object.

10 calls to FeaturesAssignTest::addConfigurationItem()
FeaturesAssignTest::testAssignAlter in tests/src/Kernel/FeaturesAssignTest.php
@covers Drupal\features\Plugin\FeaturesAssignment\FeaturesAssignmentAlter
FeaturesAssignTest::testAssignBase in tests/src/Kernel/FeaturesAssignTest.php
@covers Drupal\features\Plugin\FeaturesAssignment\FeaturesAssignmentBaseType
FeaturesAssignTest::testAssignCore in tests/src/Kernel/FeaturesAssignTest.php
@covers Drupal\features\Plugin\FeaturesAssignment\FeaturesAssignmentCoreType
FeaturesAssignTest::testAssignDependency in tests/src/Kernel/FeaturesAssignTest.php
@covers Drupal\features\Plugin\FeaturesAssignment\FeaturesAssignmentDependency
FeaturesAssignTest::testAssignForwardDependency in tests/src/Kernel/FeaturesAssignTest.php
@covers Drupal\features\Plugin\FeaturesAssignment\FeaturesAssignmentForwardDependency

... See full list

File

tests/src/Kernel/FeaturesAssignTest.php, line 848

Class

FeaturesAssignTest
The Feature Assign test.

Namespace

Drupal\Tests\features\Kernel

Code

protected function addConfigurationItem($name, array $data = [], array $properties = []) {
  $config_collection = $this->featuresManager
    ->getConfigCollection();
  $config_collection[$name] = new ConfigurationItem($name, $data, $properties);
  $this->featuresManager
    ->setConfigCollection($config_collection);
}