You are here

public function PreviewTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php \Drupal\Tests\views_ui\FunctionalJavascript\PreviewTest::setUp()
  2. 10 core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php \Drupal\Tests\views_ui\FunctionalJavascript\PreviewTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php, line 42

Class

PreviewTest
Tests the UI preview functionality.

Namespace

Drupal\Tests\views_ui\FunctionalJavascript

Code

public function setUp() {
  parent::setUp();
  ViewTestData::createTestViews(self::class, [
    'views_test_config',
  ]);
  $this
    ->enableViewsTestModule();
  $admin_user = $this
    ->drupalCreateUser([
    'administer site configuration',
    'administer views',
    'administer nodes',
    'access content overview',
  ]);

  // 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);
}