diff --git a/tests/src/Unit/FeaturesManagerTest.php b/tests/src/Unit/FeaturesManagerTest.php index cf33330..11c6687 100644 --- a/tests/src/Unit/FeaturesManagerTest.php +++ b/tests/src/Unit/FeaturesManagerTest.php @@ -42,6 +42,20 @@ class FeaturesManagerTest extends UnitTestCase { } /** + * @covers ::getActiveStorage + */ + public function testGetActiveStorage() { + $this->assertInstanceOf('\Drupal\Core\Config\StorageInterface', $this->featuresManager->getActiveStorage()); + } + + /** + * @covers ::getExtensionStorage + */ + public function testGetExtensionStorage() { + $this->assertInstanceOf('\Drupal\features\FeaturesInstallStorage', $this->featuresManager->getExtensionStorage()); + } + + /** * @covers ::getFullName * @dataProvider providerTestGetFullName */ @@ -60,4 +74,37 @@ class FeaturesManagerTest extends UnitTestCase { ]; } + /** + * @covers ::getPackage + * @covers ::getPackages + * @covers ::reset + * @covers ::setPackages + */ + public function testPackages() { + $packages = ['foo' => 'bar']; + $this->featuresManager->setPackages($packages); + $this->assertEquals($packages, $this->featuresManager->getPackages()); + $this->assertEquals('bar', $this->featuresManager->getPackage('foo')); + $this->featuresManager->reset(); + $this->assertArrayEquals([], $this->featuresManager->getPackages()); + $this->assertNull($this->featuresManager->getPackage('foo')); + } + + /** + * @covers ::setConfigCollection + * @covers ::getConfigCollection + */ + public function testConfigCollection() { + $config = ['config' => 'collection']; + $this->featuresManager->setConfigCollection($config); + $this->assertArrayEquals($config, $this->featuresManager->getConfigCollection()); + } + + /** + * @covers ::savePackage + */ + public function testSavePackage() { + // @todo + } + }