protected function Maintenance200Test::setUp in Maintenance 200 8
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ Maintenance200Test.php, line 35
Class
- Maintenance200Test
- Test maintenance 200.
Namespace
Drupal\Tests\maintenance200\FunctionalCode
protected function setUp() {
parent::setUp();
// Create Basic page node type.
if ($this->profile != 'standard') {
$this
->drupalCreateContentType([
'type' => 'page',
'name' => 'Basic page',
'display_submitted' => FALSE,
]);
}
$node = $this
->drupalCreateNode([
'title' => $this
->t('Maintenance 200 tests.'),
'type' => 'page',
'promote' => 1,
]);
$this->container
->get('router.builder')
->rebuild();
$this
->config('system.site')
->set('page.front', '/node/' . $node
->id())
->save();
}