protected function ChecklistWebTest::setUp in Security Review 8
Sets up the testing environment.
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ ChecklistWebTest.php, line 48
Class
- ChecklistWebTest
- Contains tests related to the SecurityReview class.
Namespace
Drupal\Tests\security_review\FunctionalCode
protected function setUp() {
parent::setUp();
$this->checklist = \Drupal::getContainer()
->get('security_review.checklist');
// Login.
$this->user = $this
->drupalCreateUser([
'run security checks',
'access security review list',
'access administration pages',
'administer site configuration',
]);
$this
->drupalLogin($this->user);
// Populate $checks.
$this->checks = security_review_security_review_checks();
// Clear cache.
Checklist::clearCache();
}