function UpdateScriptTest::assertInstalledExtensionConfig

Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php \Drupal\Tests\system\Functional\UpdateSystem\UpdateScriptTest::assertInstalledExtensionConfig()

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

@internal

Parameters

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

string $extension_machine_name: The extension machine name.

3 calls to UpdateScriptTest::assertInstalledExtensionConfig()
UpdateScriptTest::assertErrorOnUpdate in core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
Asserts an error is shown on the update and status report pages.
UpdateScriptTest::assertUpdateWithNoError in core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php
Asserts a particular error is 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 809

Class

UpdateScriptTest
Tests the update script access and functionality.

Namespace

Drupal\Tests\system\Functional\UpdateSystem

Code

protected function assertInstalledExtensionConfig(string $extension_type, string $extension_machine_name) : void {
    $extension_config = $this->container
        ->get('config.factory')
        ->getEditable('core.extension');
    $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.