You are here

public function BlockExposedFilterAJAXTest::setUp in Drupal 8

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

Overrides BrowserTestBase::setUp

File

core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php, line 35

Class

BlockExposedFilterAJAXTest
Tests the exposed filter ajax functionality in a block.

Namespace

Drupal\Tests\views\FunctionalJavascript

Code

public function setUp() {
  parent::setUp();
  ViewTestData::createTestViews(self::class, [
    'views_test_config',
  ]);
  $this
    ->createContentType([
    'type' => 'page',
  ]);
  $this
    ->createContentType([
    'type' => 'article',
  ]);
  $this
    ->createNode([
    'title' => 'Page A',
  ]);
  $this
    ->createNode([
    'title' => 'Page B',
  ]);
  $this
    ->createNode([
    'title' => 'Article A',
    'type' => 'article',
  ]);
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'access content',
  ]));
}