function ExtensionInstallCommandTest::moduleInstalled

Same name in this branch
  1. main core/tests/Drupal/KernelTests/Core/Extension/Command/ExtensionInstallCommandTest.php \Drupal\KernelTests\Core\Extension\Command\ExtensionInstallCommandTest::moduleInstalled()
Same name and namespace in other branches
  1. 11.x core/modules/system/tests/src/Kernel/Command/ExtensionInstallCommandTest.php \Drupal\Tests\system\Kernel\Command\ExtensionInstallCommandTest::moduleInstalled()
  2. 11.x core/tests/Drupal/KernelTests/Core/Extension/Command/ExtensionInstallCommandTest.php \Drupal\KernelTests\Core\Extension\Command\ExtensionInstallCommandTest::moduleInstalled()

Whether the given module is installed, read fresh from active config.

6 calls to ExtensionInstallCommandTest::moduleInstalled()
ExtensionInstallCommandTest::testCannotMixModulesAndThemes in core/modules/system/tests/src/Kernel/Command/ExtensionInstallCommandTest.php
Tests that modules and themes cannot be installed in the same invocation.
ExtensionInstallCommandTest::testDeclinedPromptAborts in core/modules/system/tests/src/Kernel/Command/ExtensionInstallCommandTest.php
Tests that declining the prompt throws a UserAbortException.
ExtensionInstallCommandTest::testDryRunInstallsNothing in core/modules/system/tests/src/Kernel/Command/ExtensionInstallCommandTest.php
Tests that --dry-run lists the operations but installs nothing.
ExtensionInstallCommandTest::testInstallWithConfirmedDependency in core/modules/system/tests/src/Kernel/Command/ExtensionInstallCommandTest.php
Tests confirming the prompt installs the module and its dependency.
ExtensionInstallCommandTest::testInstallWithoutDependencies in core/modules/system/tests/src/Kernel/Command/ExtensionInstallCommandTest.php
Tests installing a module without additional dependencies.

... See full list

File

core/modules/system/tests/src/Kernel/Command/ExtensionInstallCommandTest.php, line 46

Class

ExtensionInstallCommandTest
Tests the 'ex:install' command.

Namespace

Drupal\Tests\system\Kernel\Command

Code

private function moduleInstalled(string $module) : bool {
  return $this->container
    ->get('module_handler')
    ->moduleExists($module);
}

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