function UpdateScriptTest::assertInstalledExtensionsConfig

Same name in other branches
  1. 11.x core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php \Drupal\Tests\system\Functional\UpdateSystem\UpdateScriptTest::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.

3 calls to UpdateScriptTest::assertInstalledExtensionsConfig()
UpdateScriptTest::assertErrorOnUpdates in core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
Asserts errors are shown on the update and status report pages.
UpdateScriptTest::assertUpdateWithNoErrors in core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
Asserts particular errors are not shown on update and status report pages.
UpdateScriptTest::testExtensionCompatibilityChange in core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
Tests that extension compatibility changes are handled correctly.

File

core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php, line 976

Class

UpdateScriptTest
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')
        ->getEditable('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.