You are here

public function InstallTest::testEnableUserTwice in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Module/InstallTest.php \Drupal\Tests\system\Functional\Module\InstallTest::testEnableUserTwice()
  2. 9 core/modules/system/tests/src/Functional/Module/InstallTest.php \Drupal\Tests\system\Functional\Module\InstallTest::testEnableUserTwice()

Tests enabling User module once more.

Regression: The installer might enable a module twice due to automatic dependency resolution. A bug caused the stored weight for User module to be an array.

File

core/modules/system/tests/src/Functional/Module/InstallTest.php, line 45

Class

InstallTest
Tests the installation of modules.

Namespace

Drupal\Tests\system\Functional\Module

Code

public function testEnableUserTwice() {
  \Drupal::service('module_installer')
    ->install([
    'user',
  ], FALSE);
  $this
    ->assertSame(0, $this
    ->config('core.extension')
    ->get('module.user'));
}