function DrupalApplicationTesterTrait::applicationTester
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/DrupalApplicationTesterTrait.php \Drupal\KernelTests\DrupalApplicationTesterTrait::applicationTester()
Build our ApplicationTester.
File
-
core/
tests/ Drupal/ KernelTests/ DrupalApplicationTesterTrait.php, line 20
Class
- DrupalApplicationTesterTrait
- Trait to help with testing the drupal console.
Namespace
Drupal\KernelTestsCode
private function applicationTester(array $context = []) : ApplicationTester {
$application = include static::binDir() . '/dr';
$context['kernel.environment'] = 'testing';
$context['kernel.allow_dumping'] = FALSE;
$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.