function ExtensionInstallCommandTest::testNonInteractiveAbortsWithoutYes
Same name in this branch
- main core/tests/Drupal/KernelTests/Core/Extension/Command/ExtensionInstallCommandTest.php \Drupal\KernelTests\Core\Extension\Command\ExtensionInstallCommandTest::testNonInteractiveAbortsWithoutYes()
Same name and namespace in other branches
- 11.x core/modules/system/tests/src/Kernel/Command/ExtensionInstallCommandTest.php \Drupal\Tests\system\Kernel\Command\ExtensionInstallCommandTest::testNonInteractiveAbortsWithoutYes()
- 11.x core/tests/Drupal/KernelTests/Core/Extension/Command/ExtensionInstallCommandTest.php \Drupal\KernelTests\Core\Extension\Command\ExtensionInstallCommandTest::testNonInteractiveAbortsWithoutYes()
Tests that a non-interactive run aborts unless --yes is supplied.
File
-
core/
modules/ system/ tests/ src/ Kernel/ Command/ ExtensionInstallCommandTest.php, line 123
Class
- ExtensionInstallCommandTest
- Tests the 'ex:install' command.
Namespace
Drupal\Tests\system\Kernel\CommandCode
public function testNonInteractiveAbortsWithoutYes() : void {
// Dependencies must be confirmed with --yes when there is no interactive
// prompt to answer; the command aborts before installing anything.
$this->expectException(UserAbortException::class);
$this->commandTester()
->execute([
'extensions' => 'console_test',
], [
'interactive' => FALSE,
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.