function PaginationAJAXTest::setUp

Same name in other branches
  1. 9 core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php \Drupal\Tests\views\FunctionalJavascript\PaginationAJAXTest::setUp()
  2. 10 core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php \Drupal\Tests\views\FunctionalJavascript\PaginationAJAXTest::setUp()
  3. 11.x core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php \Drupal\Tests\views\FunctionalJavascript\PaginationAJAXTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php, line 41

Class

PaginationAJAXTest
Tests the click sorting AJAX functionality of Views exposed forms.

Namespace

Drupal\Tests\views\FunctionalJavascript

Code

protected function setUp() {
    parent::setUp();
    ViewTestData::createTestViews(self::class, [
        'views_test_config',
    ]);
    // Create a Content type and eleven test nodes.
    $this->createContentType([
        'type' => 'page',
    ]);
    for ($i = 1; $i <= 11; $i++) {
        $this->createNode([
            'title' => 'Node ' . $i . ' content',
            'changed' => $i * 1000,
        ]);
    }
    // Create a user privileged enough to view content.
    $user = $this->drupalCreateUser([
        'administer site configuration',
        'access content',
        'access content overview',
    ]);
    $this->drupalLogin($user);
}

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