protected function SecurityAdvisoriesFetcherTest::getAdvisories in Drupal 10
Same name and namespace in other branches
- 9 core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php \Drupal\Tests\system\Kernel\SecurityAdvisories\SecurityAdvisoriesFetcherTest::getAdvisories()
Gets the advisories from the 'system.sa_fetcher' service.
Parameters
bool $allow_http_request: Argument to pass on to SecurityAdvisoriesFetcher::getSecurityAdvisories().
Return value
\Drupal\system\SecurityAdvisories\SecurityAdvisory[]|null The return value of SecurityAdvisoriesFetcher::getSecurityAdvisories().
6 calls to SecurityAdvisoriesFetcherTest::getAdvisories()
- SecurityAdvisoriesFetcherTest::testHttpFallback in core/
modules/ system/ tests/ src/ Kernel/ SecurityAdvisories/ SecurityAdvisoriesFetcherTest.php - @covers ::doRequest @covers ::getSecurityAdvisories
- SecurityAdvisoriesFetcherTest::testIgnoreAdvisories in core/
modules/ system/ tests/ src/ Kernel/ SecurityAdvisories/ SecurityAdvisoriesFetcherTest.php - Tests advisories that should be ignored.
- SecurityAdvisoriesFetcherTest::testIntervalConfigUpdate in core/
modules/ system/ tests/ src/ Kernel/ SecurityAdvisories/ SecurityAdvisoriesFetcherTest.php - Tests that the stored advisories response is deleted on interval decrease.
- SecurityAdvisoriesFetcherTest::testInvalidJsonResponse in core/
modules/ system/ tests/ src/ Kernel/ SecurityAdvisories/ SecurityAdvisoriesFetcherTest.php - Tests that invalid JSON feed responses are not stored.
- SecurityAdvisoriesFetcherTest::testNoHttpFallback in core/
modules/ system/ tests/ src/ Kernel/ SecurityAdvisories/ SecurityAdvisoriesFetcherTest.php - @covers ::doRequest @covers ::getSecurityAdvisories
File
- core/
modules/ system/ tests/ src/ Kernel/ SecurityAdvisories/ SecurityAdvisoriesFetcherTest.php, line 702
Class
- SecurityAdvisoriesFetcherTest
- @coversDefaultClass \Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher
Namespace
Drupal\Tests\system\Kernel\SecurityAdvisoriesCode
protected function getAdvisories(bool $allow_http_request = TRUE) : ?array {
$fetcher = $this->container
->get('system.sa_fetcher');
return $fetcher
->getSecurityAdvisories($allow_http_request);
}