protected function FrontPageTest::setUp in Drupal 10
Same name in this branch
- 10 core/modules/node/tests/src/Functional/Views/FrontPageTest.php \Drupal\Tests\node\Functional\Views\FrontPageTest::setUp()
- 10 core/modules/system/tests/src/Functional/System/FrontPageTest.php \Drupal\Tests\system\Functional\System\FrontPageTest::setUp()
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Functional/System/FrontPageTest.php \Drupal\Tests\system\Functional\System\FrontPageTest::setUp()
- 9 core/modules/system/tests/src/Functional/System/FrontPageTest.php \Drupal\Tests\system\Functional\System\FrontPageTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ system/ tests/ src/ Functional/ System/ FrontPageTest.php, line 33
Class
- FrontPageTest
- Tests front page functionality and administration.
Namespace
Drupal\Tests\system\Functional\SystemCode
protected function setUp() : void {
parent::setUp();
// Create admin user, log in admin user, and create one node.
$this
->drupalLogin($this
->drupalCreateUser([
'access content',
'administer site configuration',
]));
$this
->drupalCreateContentType([
'type' => 'page',
]);
$this->nodePath = "node/" . $this
->drupalCreateNode([
'promote' => 1,
])
->id();
// Configure 'node' as front page.
$this
->config('system.site')
->set('page.front', '/node')
->save();
// Enable front page logging in system_test.module.
\Drupal::state()
->set('system_test.front_page_output', 1);
}