protected function ViewsNoResultsBehaviorTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Functional/ViewsNoResultsBehaviorTest.php \Drupal\Tests\views\Functional\ViewsNoResultsBehaviorTest::setUp()
Overrides ViewTestBase::setUp
File
- core/
modules/ views/ tests/ src/ Functional/ ViewsNoResultsBehaviorTest.php, line 27
Class
- ViewsNoResultsBehaviorTest
- Tests no results behavior.
Namespace
Drupal\Tests\views\FunctionalCode
protected function setUp($import_test_views = TRUE) : void {
parent::setUp();
$this
->enableViewsTestModule();
$user = $this
->createUser([], NULL, TRUE);
$this
->drupalLogin($user);
// Set the Stark theme and use the default templates from views module.
/** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
$theme_installer = \Drupal::service('theme_installer');
$theme_installer
->install([
'stark',
]);
$this
->config('system.theme')
->set('default', 'stark')
->save();
}