function SecurityAdvisoriesFetcherTest::getAdvisories
Same name in other branches
- 9 core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php \Drupal\Tests\system\Kernel\SecurityAdvisories\SecurityAdvisoriesFetcherTest::getAdvisories()
- 11.x 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 705
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.