You are here

public function SecurityAdvisoriesFetcherTest::log in Drupal 9

Same name and namespace in other branches
  1. 10 core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php \Drupal\Tests\system\Kernel\SecurityAdvisories\SecurityAdvisoriesFetcherTest::log()

Overrides RfcLoggerTrait::log

File

core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php, line 742

Class

SecurityAdvisoriesFetcherTest
@coversDefaultClass \Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher

Namespace

Drupal\Tests\system\Kernel\SecurityAdvisories

Code

public function log($level, $message, array $context = []) : void {
  if (isset($context['@message'])) {
    $this->watchdogExceptionMessages[] = $context['@message'];
  }
  if ($level === RfcLogLevel::ERROR) {
    $this->logErrorMessages[] = $message;
  }
}