function UpdateScriptTestBase::assertInstalledExtensionsConfig

Asserts that an installed extension's config setting is correct.

@internal

Parameters

string $extension_type: The extension type, either 'module' or 'theme'.

array $extension_machine_names: An array of the extension machine names.

File

core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTestBase.php, line 181

Class

UpdateScriptTestBase
Tests the update script access and functionality.

Namespace

Drupal\Tests\system\Functional\UpdateSystem

Code

protected function assertInstalledExtensionsConfig(string $extension_type, array $extension_machine_names) : void {
  $extension_config = $this->container
    ->get('config.factory')
    ->get('core.extension');
  foreach ($extension_machine_names as $extension_machine_name) {
    $this->assertSame(0, $extension_config->get("{$extension_type}.{$extension_machine_name}"));
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.