function ExtensionUninstallCommandTest::testUnknownExtensionFails

Tests that an unknown extension produces an error.

File

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

Class

ExtensionUninstallCommandTest
Tests the 'ex:uninstall' command.

Namespace

Drupal\KernelTests\Core\Extension\Command

Code

public function testUnknownExtensionFails() : void {
  $tester = $this->commandTester();
  $code = $tester->execute([
    'extensions' => 'this_does_not_exist',
  ]);
  $this->assertEquals(Command::FAILURE, $code);
  $this->assertStringContainsString('could not be found', $tester->getDisplay());
}

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