protected function ClickSortingAJAXTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php \Drupal\Tests\views\FunctionalJavascript\ClickSortingAJAXTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ views/ tests/ src/ FunctionalJavascript/ ClickSortingAJAXTest.php, line 35
Class
- ClickSortingAJAXTest
- Tests the click sorting AJAX functionality of Views exposed forms.
Namespace
Drupal\Tests\views\FunctionalJavascriptCode
protected function setUp() : void {
parent::setUp();
ViewTestData::createTestViews(self::class, [
'views_test_config',
]);
// Create a Content type and two test nodes.
$this
->createContentType([
'type' => 'page',
]);
$this
->createNode([
'title' => 'Page A',
'changed' => REQUEST_TIME,
]);
$this
->createNode([
'title' => 'Page B',
'changed' => REQUEST_TIME + 1000,
]);
// Create a user privileged enough to view content.
$user = $this
->drupalCreateUser([
'administer site configuration',
'access content',
'access content overview',
]);
$this
->drupalLogin($user);
}