function ConsoleTest::applicationTester

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

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

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.