You are here

public function ConfigCollectorTest::testFooProvider in Configuration Provider 8.2

Test Configuration Provider collector collects Foo provider and config.

File

tests/src/Kernel/ConfigCollectorTest.php, line 26

Class

ConfigCollectorTest
Test description.

Namespace

Drupal\Tests\config_provider\Kernel

Code

public function testFooProvider() {

  // Avoid ConfigCollector deprecation message, requiring the install profile.
  $this
    ->setInstallProfile('testing');
  $collector = $this->container
    ->get('config_provider.collector');
  $collector
    ->addInstallableConfig();
  $storage = $this->container
    ->get('config_provider.storage');
  $this
    ->assertTrue($storage
    ->exists('foo.whatever.settings'));
  $foo = $storage
    ->read('foo.whatever.settings');
  $this
    ->assertSame(TRUE, $foo['foo']);
  $this
    ->assertSame(FALSE, $foo['bar']);
}