function ThemeTest::setUp
Overrides TaxonomyTestBase::setUp
File
-
core/
modules/ taxonomy/ tests/ src/ Functional/ ThemeTest.php, line 22
Class
- ThemeTest
- Verifies that various taxonomy pages use the expected theme.
Namespace
Drupal\Tests\taxonomy\FunctionalCode
protected function setUp() : void {
parent::setUp();
// Make sure we are using distinct default and administrative themes for
// the duration of these tests.
\Drupal::service('theme_installer')->install([
'olivero',
'claro',
]);
$this->config('system.theme')
->set('default', 'olivero')
->set('admin', 'claro')
->save();
// Create and log in as a user who has permission to add and edit taxonomy
// terms and view the administrative theme.
$admin_user = $this->drupalCreateUser([
'administer taxonomy',
'view the administration theme',
]);
$this->drupalLogin($admin_user);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.