function ExtensionInstallCommandTest::testNonInteractiveAbortsWithoutYes
Tests that a non-interactive run aborts unless --yes is supplied.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Extension/ Command/ ExtensionInstallCommandTest.php, line 123
Class
- ExtensionInstallCommandTest
- Tests the 'ex:install' command.
Namespace
Drupal\KernelTests\Core\Extension\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.