function ExtensionUninstallCommandTest::testNonInteractiveAbortsWithoutYes
Tests that a non-interactive run aborts unless --yes is supplied.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Extension/ Command/ ExtensionUninstallCommandTest.php, line 136
Class
- ExtensionUninstallCommandTest
- Tests the 'ex:uninstall' command.
Namespace
Drupal\KernelTests\Core\Extension\CommandCode
public function testNonInteractiveAbortsWithoutYes() : void {
// Dependents must be confirmed with --yes when there is no interactive
// prompt to answer; the command aborts before uninstalling anything.
$this->expectException(UserAbortException::class);
$this->commandTester()
->execute([
'extensions' => 'autowire_test',
], [
'interactive' => FALSE,
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.