function ConsoleTest::testConfigureCommandIds

Same name and namespace in other branches
  1. main core/tests/Drupal/KernelTests/Core/Console/ConsoleTest.php \Drupal\KernelTests\Core\Console\ConsoleTest::testConfigureCommandIds()

Tests command loader has the discovered commands IDs via configure().

File

core/tests/Drupal/KernelTests/Core/Console/ConsoleTest.php, line 82

Class

ConsoleTest
Tests integration with Symfony Console.

Namespace

Drupal\KernelTests\Core\Console

Code

public function testConfigureCommandIds() : void {
  $commandIds = \Drupal::getContainer()->getParameter('console.command.ids');
  $this->assertEquals([
    ConsoleExampleConfigureCommand::class,
    // A public alias is created for this private command.
'console.command.public_alias.' . ConsoleExamplePrivateCommand::class,
  ], $commandIds);
}

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