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.

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.