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

Breadcrumb

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

function Collector::testTriggeredDeprecation

File

vendor/phpunit/phpunit/src/Runner/TestResult/Collector.php, line 347

Class

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

Namespace

PHPUnit\TestRunner\TestResult

Code

public function testTriggeredDeprecation(DeprecationTriggered $event) : void {
    if ($event->ignoredByTest()) {
        return;
    }
    if ($event->ignoredByBaseline()) {
        $this->numberOfIssuesIgnoredByBaseline++;
        return;
    }
    if (!$this->source
        ->ignoreSuppressionOfDeprecations() && $event->wasSuppressed()) {
        return;
    }
    if ($this->source
        ->restrictDeprecations() && !(new SourceFilter())->includes($this->source, $event->file())) {
        return;
    }
    $id = $this->issueId($event);
    if (!isset($this->deprecations[$id])) {
        $this->deprecations[$id] = Issue::from($event->file(), $event->line(), $event->message(), $event->test());
        return;
    }
    $this->deprecations[$id]
        ->triggeredBy($event->test());
}
RSS feed
Powered by Drupal