function Application::execute
4 calls to Application::execute()
- Application::executeCommandsThatOnlyRequireCliConfiguration in vendor/
phpunit/ phpunit/ src/ TextUI/ Application.php - Application::executeCommandsThatRequireCliConfigurationAndTestSuite in vendor/
phpunit/ phpunit/ src/ TextUI/ Application.php - Application::executeCommandsThatRequireCompleteConfiguration in vendor/
phpunit/ phpunit/ src/ TextUI/ Application.php - Application::executeHelpCommandWhenThereIsNothingElseToDo in vendor/
phpunit/ phpunit/ src/ TextUI/ Application.php
File
-
vendor/
phpunit/ phpunit/ src/ TextUI/ Application.php, line 295
Class
- Application
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\TextUICode
private function execute(Command\Command $command, bool $requiresResultCollectedFromEvents = false) : never {
if ($requiresResultCollectedFromEvents) {
try {
TestResultFacade::init();
EventFacade::instance()->seal();
$resultCollectedFromEvents = TestResultFacade::result();
} catch (EventFacadeIsSealedException|UnknownSubscriberTypeException) {
}
}
print Version::getVersionString() . PHP_EOL . PHP_EOL;
$result = $command->execute();
print $result->output();
$shellExitCode = $result->shellExitCode();
if (isset($resultCollectedFromEvents) && $resultCollectedFromEvents->hasTestTriggeredPhpunitErrorEvents()) {
$shellExitCode = Result::EXCEPTION;
print PHP_EOL . PHP_EOL . 'There were errors:' . PHP_EOL;
foreach ($resultCollectedFromEvents->testTriggeredPhpunitErrorEvents() as $events) {
foreach ($events as $event) {
print PHP_EOL . trim($event->message()) . PHP_EOL;
}
}
}
exit($shellExitCode);
}