function ExtensionUninstallCommandTest::testUninstallWithConfirmedDependent

Tests confirming the prompt uninstalls the module and its dependent.

File

core/tests/Drupal/KernelTests/Core/Extension/Command/ExtensionUninstallCommandTest.php, line 91

Class

ExtensionUninstallCommandTest
Tests the 'ex:uninstall' command.

Namespace

Drupal\KernelTests\Core\Extension\Command

Code

public function testUninstallWithConfirmedDependent() : void {
  $tester = $this->commandTester();
  $tester->setInputs([
    'yes',
  ]);
  $code = $tester->execute([
    'extensions' => 'autowire_test',
  ], [
    'interactive' => TRUE,
  ]);
  $this->assertEquals(Command::SUCCESS, $code, $tester->getDisplay());
  $this->assertFalse($this->moduleInstalled('autowire_test'));
  $this->assertFalse($this->moduleInstalled('console_test'));
}

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