Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Application.php

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\TextUI

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal