diff --git a/src/ConfigurationItem.php b/src/ConfigurationItem.php index cccc24a..1f811eb 100644 --- a/src/ConfigurationItem.php +++ b/src/ConfigurationItem.php @@ -276,6 +276,7 @@ class ConfigurationItem { */ public function setProvidingFeature($providingFeature) { $this->providingFeature = $providingFeature; + return $this; } /** diff --git a/tests/src/Unit/FeaturesManagerTest.php b/tests/src/Unit/FeaturesManagerTest.php index 6891cfe..c146870 100644 --- a/tests/src/Unit/FeaturesManagerTest.php +++ b/tests/src/Unit/FeaturesManagerTest.php @@ -115,7 +115,7 @@ class FeaturesManagerTest extends UnitTestCase { * @covers ::getConfigCollection */ public function testConfigCollection() { - $config = ['config' => new ConfigurationItem('', [], '', '', '', [], '', '', TRUE, '', [])]; + $config = ['config' => new ConfigurationItem('', [])]; $this->featuresManager->setConfigCollection($config); $this->assertArrayEquals($config, $this->featuresManager->getConfigCollection()); } @@ -129,20 +129,23 @@ class FeaturesManagerTest extends UnitTestCase { protected function getAssignInterPackageDependenciesConfigCollection() { $config_collection = []; - $config_collection['example.config'] = new ConfigurationItem('example.config', [ + $config_collection['example.config'] = (new ConfigurationItem('example.config', [ 'dependencies' => [ 'config' => [ 'example.config2', 'example.config3', ], ], - ], '', '', '', [], '', 'package', FALSE, ''); - $config_collection['example.config2'] = new ConfigurationItem('example.config2', [ + ]))->setPackage('package'); + $config_collection['example.config2'] = (new ConfigurationItem('example.config2', [ 'dependencies' => [], - ], '', '', '', [], '', 'package2', TRUE, 'my_feature'); - $config_collection['example.config3'] = new ConfigurationItem('example.config3', [ + ])) + ->setPackage('package2') + ->setProvidingFeature('my_feature'); + $config_collection['example.config3'] = (new ConfigurationItem('example.config3', [ 'dependencies' => [], - ], '', '', '', [], '', '', TRUE, 'my_other_feature'); + ])) + ->setProvidingFeature('my_other_feature'); return $config_collection; }