function ConsoleTest::applicationTester

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

Builds an ApplicationTester to invoke `vendor/bin/dr`.

3 calls to ConsoleTest::applicationTester()
ConsoleTest::testApplication in core/tests/Drupal/KernelTests/Core/Console/ConsoleTest.php
Tests the application wrapped by symfony/runtime.
ConsoleTest::testConsoleCommand in core/tests/Drupal/KernelTests/Core/Console/ConsoleTest.php
Tests running a console command.
ConsoleTest::testSubdirectoryCommand in core/tests/Drupal/KernelTests/Core/Console/ConsoleTest.php
Tests running a console command defined in a subdirectory.

File

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

Class

ConsoleTest
Tests integration with Symfony Console.

Namespace

Drupal\KernelTests\Core\Console

Code

private function applicationTester(array $context = []) : ApplicationTester {
  $application = include __DIR__ . '/../../../../../../vendor/bin/dr';
  $application = $application($context);
  $application->setAutoExit(FALSE);
  return new ApplicationTester($application);
}

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