You are here

public function EnvironmentConfigOverrideTest::testStaticOverridesWithArrayEnvironment in Config override 8

File

tests/Unit/EnvironmentConfigOverrideTest.php, line 86

Class

EnvironmentConfigOverrideTest
@coversDefaultClass \Drupal\config_override\EnvironmentConfigOverride @group config_override

Namespace

Drupal\config_override\Tests\Unit

Code

public function testStaticOverridesWithArrayEnvironment() {
  putenv('CONFIG___EXAMPLE___KEY={"hey":"elephant"}');
  $sut = new EnvironmentConfigOverride([
    'example' => [
      'key' => '{"hey":"giraffe"}',
    ],
  ]);
  $this
    ->assertEquals([
    'example' => [
      'key' => [
        'hey' => 'elephant',
      ],
    ],
  ], $sut
    ->loadOverrides([
    'example',
  ]));
}