protected function SearchAdminThemeTest::setUp in Drupal 10
Same name and namespace in other branches
- 9 core/modules/search/tests/src/Functional/SearchAdminThemeTest.php \Drupal\Tests\search\Functional\SearchAdminThemeTest::setUp()
File
- core/
modules/ search/ tests/ src/ Functional/ SearchAdminThemeTest.php, line 38
Class
- SearchAdminThemeTest
- Verify the search results using administration theme for specific plugins.
Namespace
Drupal\Tests\search\FunctionalCode
protected function setUp() : void {
parent::setUp();
// Install an administration theme to make sure it used for search results.
\Drupal::service('theme_installer')
->install([
$this->adminTheme,
]);
\Drupal::configFactory()
->getEditable('system.theme')
->set('admin', $this->adminTheme)
->save();
// Create searching user.
$user = $this
->drupalCreateUser([
'access content',
'search content',
'access user profiles',
'view the administration theme',
]);
// Log in with sufficient privileges.
$this
->drupalLogin($user);
}