You are here

protected function FeaturesAssignTest::setUp in Features 8.4

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

Overrides KernelTestBase::setUp

File

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

Class

FeaturesAssignTest
The Feature Assign test.

Namespace

Drupal\Tests\features\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installConfig('features');
  $this
    ->installConfig('system');
  $this->featuresManager = \Drupal::service('features.manager');
  $this->assigner = \Drupal::service('features_assigner');
  $this->bundle = $this->assigner
    ->getBundle();

  // Turn off all assignment plugins.
  $this->bundle
    ->setEnabledAssignments([]);

  // Start with an empty configuration collection.
  $this->featuresManager
    ->setConfigCollection([]);
}