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

Breadcrumb

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

function TeamCityLogger::testFailed

Throws

InvalidArgumentException

File

vendor/phpunit/phpunit/src/Logging/TeamCity/TeamCityLogger.php, line 205

Class

TeamCityLogger
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Namespace

PHPUnit\Logging\TeamCity

Code

public function testFailed(Failed $event) : void {
    if ($this->time === null) {
        $this->time = $event->telemetryInfo()
            ->time();
    }
    $parameters = [
        'name' => $event->test()
            ->name(),
        'message' => $this->message($event->throwable()),
        'details' => $this->details($event->throwable()),
        'duration' => $this->duration($event),
    ];
    if ($event->hasComparisonFailure()) {
        $parameters['type'] = 'comparisonFailure';
        $parameters['actual'] = $event->comparisonFailure()
            ->actual();
        $parameters['expected'] = $event->comparisonFailure()
            ->expected();
    }
    $this->writeMessage('testFailed', $parameters);
}

API Navigation

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