protected function SecurityAdvisoryTest::setUp in Drupal 9
Overrides BrowserTestBase::setUp
File
- core/
modules/ system/ tests/ src/ Functional/ SecurityAdvisories/ SecurityAdvisoryTest.php, line 85
Class
- SecurityAdvisoryTest
- Tests of security advisories functionality.
Namespace
Drupal\Tests\system\Functional\SecurityAdvisoriesCode
protected function setUp() : void {
parent::setUp();
$this->user = $this
->drupalCreateUser([
'access administration pages',
'administer site configuration',
'administer software updates',
]);
$this
->drupalLogin($this->user);
$fixtures_path = $this->baseUrl . '/core/modules/system/tests/fixtures/psa_feed';
$this->workingEndpointMixed = $this
->buildUrl('/advisory-feed-json/valid-mixed');
$this->workingEndpointPsaOnly = $this
->buildUrl('/advisory-feed-json/valid-psa-only');
$this->workingEndpointNonPsaOnly = $this
->buildUrl('/advisory-feed-json/valid-non-psa-only');
$this->nonWorkingEndpoint = $this
->buildUrl('/advisory-feed-json/missing');
$this->invalidJsonEndpoint = "{$fixtures_path}/invalid.json";
$this->tempStore = $this->container
->get('keyvalue.expirable')
->get('system');
}