function DisplayTest::setUp

Same name in this branch
  1. 9 core/modules/views/tests/src/Functional/Plugin/DisplayTest.php \Drupal\Tests\views\Functional\Plugin\DisplayTest::setUp()
Same name in other branches
  1. 8.9.x core/modules/views/tests/src/Functional/Plugin/DisplayTest.php \Drupal\Tests\views\Functional\Plugin\DisplayTest::setUp()
  2. 8.9.x core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php \Drupal\Tests\views_ui\FunctionalJavascript\DisplayTest::setUp()
  3. 10 core/modules/views/tests/src/Functional/Plugin/DisplayTest.php \Drupal\Tests\views\Functional\Plugin\DisplayTest::setUp()
  4. 10 core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php \Drupal\Tests\views_ui\FunctionalJavascript\DisplayTest::setUp()
  5. 11.x core/modules/views/tests/src/Functional/Plugin/DisplayTest.php \Drupal\Tests\views\Functional\Plugin\DisplayTest::setUp()
  6. 11.x core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php \Drupal\Tests\views_ui\FunctionalJavascript\DisplayTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php, line 47

Class

DisplayTest
Tests the display UI.

Namespace

Drupal\Tests\views_ui\FunctionalJavascript

Code

public function setUp() : void {
    parent::setUp();
    ViewTestData::createTestViews(self::class, [
        'views_test_config',
    ]);
    $admin_user = $this->drupalCreateUser([
        'administer site configuration',
        'administer views',
        'administer nodes',
        'access content overview',
        'access contextual links',
    ]);
    // Disable automatic live preview to make the sequence of calls clearer.
    \Drupal::configFactory()->getEditable('views.settings')
        ->set('ui.always_live_preview', FALSE)
        ->save();
    $this->drupalLogin($admin_user);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.