protected function FeaturesGenerateTest::setUp in Features 8.4
Same name and namespace in other branches
- 8.3 tests/src/Kernel/FeaturesGenerateTest.php \Drupal\Tests\features\Kernel\FeaturesGenerateTest::setUp()
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ FeaturesGenerateTest.php, line 54
Class
- FeaturesGenerateTest
- @group features
Namespace
Drupal\Tests\features\KernelCode
protected function setUp() {
parent::setUp();
$this
->installConfig('features');
$this
->installConfig('system');
$this->featuresManager = \Drupal::service('features.manager');
$this->generator = \Drupal::service('features_generator');
$this->assigner = \Drupal::service('features_assigner');
$this->fileSystem = \Drupal::service('file_system');
$this->featuresManager
->initPackage(self::PACKAGE_NAME, 'My test package');
$package = $this->featuresManager
->getPackage(self::PACKAGE_NAME);
$package
->appendConfig('system.site');
$this->featuresManager
->setPackage($package);
}