function FilterStringTest::getBasicPageView

Same name and namespace in other branches
  1. 8.9.x core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php \Drupal\Tests\views\Kernel\Handler\FilterStringTest::getBasicPageView()
  2. 10 core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php \Drupal\Tests\views\Kernel\Handler\FilterStringTest::getBasicPageView()
  3. 11.x core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php \Drupal\Tests\views\Kernel\Handler\FilterStringTest::getBasicPageView()

Build and return a Page view of the views_test_data table.

Return value

view

12 calls to FilterStringTest::getBasicPageView()
FilterStringTest::testFilterStringGroupedExposedContains in core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
FilterStringTest::testFilterStringGroupedExposedEmpty in core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
FilterStringTest::testFilterStringGroupedExposedEnds in core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
FilterStringTest::testFilterStringGroupedExposedEqual in core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
FilterStringTest::testFilterStringGroupedExposedLonger in core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php

... See full list

File

core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php, line 76

Class

FilterStringTest
Tests the core <a href="/api/drupal/core%21modules%21views%21src%21Plugin%21views%21filter%21StringFilter.php/class/StringFilter/9" title="Basic textfield filter to handle string filtering commands." class="local">Drupal\views\Plugin\views\filter\StringFilter</a> handler.

Namespace

Drupal\Tests\views\Kernel\Handler

Code

protected function getBasicPageView() {
    $view = Views::getView('test_view');
    // In order to test exposed filters, we have to disable
    // the exposed forms cache.
    \Drupal::service('views.exposed_form_cache')->reset();
    $view->newDisplay('page', 'Page', 'page_1');
    return $view;
}

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