protected function SiteMaintenanceTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/src/Functional/System/SiteMaintenanceTest.php \Drupal\Tests\system\Functional\System\SiteMaintenanceTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ system/ tests/ src/ Functional/ System/ SiteMaintenanceTest.php, line 34
Class
- SiteMaintenanceTest
- Tests access to site while in maintenance mode.
Namespace
Drupal\Tests\system\Functional\SystemCode
protected function setUp() {
parent::setUp();
// Configure 'node' as front page.
$this
->config('system.site')
->set('page.front', '/node')
->save();
$this
->config('system.performance')
->set('js.preprocess', 1)
->save();
// Create a user allowed to access site in maintenance mode.
$this->user = $this
->drupalCreateUser([
'access site in maintenance mode',
]);
// Create an administrative user.
$this->adminUser = $this
->drupalCreateUser([
'administer site configuration',
'access site in maintenance mode',
]);
$this
->drupalLogin($this->adminUser);
}