function ExtensionInstallCommandTest::testExtensionLinksAppearInSuccessOutput

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/src/Kernel/Command/ExtensionInstallCommandTest.php \Drupal\Tests\system\Kernel\Command\ExtensionInstallCommandTest::testExtensionLinksAppearInSuccessOutput()

Tests that Help and Permissions links appear for console_test after install.

File

core/modules/system/tests/src/Kernel/Command/ExtensionInstallCommandTest.php, line 169

Class

ExtensionInstallCommandTest
Tests the 'ex:install' command.

Namespace

Drupal\Tests\system\Kernel\Command

Code

public function testExtensionLinksAppearInSuccessOutput() : void {
  $tester = $this->commandTester();
  $code = $tester->execute([
    'extensions' => 'console_test',
    '--yes' => TRUE,
  ]);
  $display = $tester->getDisplay();
  $this->assertEquals(Command::SUCCESS, $code);
  // console_test implements hook_help and declares a permission, so both
  // links should appear alongside it in the success listing.
  $this->assertStringContainsString('(console_test) — Help, Permissions', $display);
}

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