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