function Collector::testTriggeredWarning
File
-
vendor/
phpunit/ phpunit/ src/ Runner/ TestResult/ Collector.php, line 514
Class
- Collector
- @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Namespace
PHPUnit\TestRunner\TestResultCode
public function testTriggeredWarning(WarningTriggered $event) : void {
if ($event->ignoredByBaseline()) {
$this->numberOfIssuesIgnoredByBaseline++;
return;
}
if (!$this->source
->ignoreSuppressionOfWarnings() && $event->wasSuppressed()) {
return;
}
if ($this->source
->restrictWarnings() && !(new SourceFilter())->includes($this->source, $event->file())) {
return;
}
$id = $this->issueId($event);
if (!isset($this->warnings[$id])) {
$this->warnings[$id] = Issue::from($event->file(), $event->line(), $event->message(), $event->test());
return;
}
$this->warnings[$id]
->triggeredBy($event->test());
}