function ExtensionInstallCommandTest::commandTester

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::commandTester()

Builds a command tester for the 'ex:install' command.

File

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

Class

ExtensionInstallCommandTest
Tests the 'ex:install' command.

Namespace

Drupal\Tests\system\Kernel\Command

Code

private function commandTester() : CommandTester {
  $command = new ExtensionInstallCommand($this->container
    ->get('module_installer'), $this->container
    ->get('theme_installer'), $this->container
    ->get('extension.list.module'), $this->container
    ->get('extension.list.theme'), $this->container
    ->get('messenger'));
  return new CommandTester($command);
}

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