You are here

protected function SecurityAdvisoriesFetcherTest::assertServiceAdvisoryLoggedErrors in Drupal 10

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

Asserts the expected error messages were logged.

@internal

Parameters

string[] $expected_messages: The expected error messages.

1 call to SecurityAdvisoriesFetcherTest::assertServiceAdvisoryLoggedErrors()
SecurityAdvisoriesFetcherTest::testInvalidJsonResponse in core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php
Tests that invalid JSON feed responses are not stored.

File

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

Class

SecurityAdvisoriesFetcherTest
@coversDefaultClass \Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher

Namespace

Drupal\Tests\system\Kernel\SecurityAdvisories

Code

protected function assertServiceAdvisoryLoggedErrors(array $expected_messages) : void {
  $this
    ->assertSame($expected_messages, $this->logErrorMessages);
  $this->logErrorMessages = [];
}